Linux Kernels

staging: lustre: lov: remove always false condition

This change “staging: lustre: lov: remove always false condition” (commit 4cba197) in Linux kernel is authored by Sudip Mukherjee <sudipm.mukherjee [at] gmail.com> on Tue Sep 8 21:53:02 2015 +0530.

Description of "staging: lustre: lov: remove always false condition"

The change “staging: lustre: lov: remove always false condition” introduces changes as follows.

staging: lustre: lov: remove always false condition

The member qc_idx of struct if_quotactl is unsigned and hence it can
never be less than zero.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Linux kernel releases containing commit 4cba197

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "staging: lustre: lov: remove always false condition"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 
diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c
index 2a2fd8de055d..906503b05979 100644
--- a/drivers/staging/lustre/lustre/lov/lov_obd.c
+++ b/drivers/staging/lustre/lustre/lov/lov_obd.c
@@ -1487,7 +1487,7 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
 		struct obd_quotactl *oqctl;
 
 		if (qctl->qc_valid == QC_OSTIDX) {
-			if (qctl->qc_idx < 0 || count <= qctl->qc_idx)
+			if (count <= qctl->qc_idx)
 				return -EINVAL;
 
 			tgt = lov->lov_tgts[qctl->qc_idx];

The commit for this change in Linux stable tree is 4cba197 (patch).

Last modified: 2020/01/11 09:42