summaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre
diff options
context:
space:
mode:
authorJames Simmons <jsimmons@infradead.org>2016-08-16 16:19:23 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-21 15:57:38 +0200
commita5c954eff652359aeecb4d822e8e8cef86abcb9b (patch)
tree02f5766ad5531b8d8f38e62d5fd245125835808a /drivers/staging/lustre
parent3147b268400adeec63b6253534a6176c99b8af80 (diff)
downloadblackbird-op-linux-a5c954eff652359aeecb4d822e8e8cef86abcb9b.tar.gz
blackbird-op-linux-a5c954eff652359aeecb4d822e8e8cef86abcb9b.zip
staging: lustre: include: fix one off errors in lustre_id.h
During inspection of another patch Dan Carpenter noticed some one off errors in lustre_id.h. Fix the condition test for OBIF_MAX_OID. Signed-off-by: James Simmons <jsimmons@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre')
-rw-r--r--drivers/staging/lustre/lustre/include/lustre/lustre_idl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
index 17581bac3a37..95454510a212 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
@@ -659,7 +659,7 @@ static inline void ostid_set_id(struct ost_id *oi, __u64 oid)
oi->oi_fid.f_oid = oid;
oi->oi_fid.f_ver = oid >> 48;
} else {
- if (oid > OBIF_MAX_OID) {
+ if (oid >= OBIF_MAX_OID) {
CERROR("Bad %llu to set " DOSTID "\n", oid, POSTID(oi));
return;
}
@@ -684,7 +684,7 @@ static inline int fid_set_id(struct lu_fid *fid, __u64 oid)
fid->f_oid = oid;
fid->f_ver = oid >> 48;
} else {
- if (oid > OBIF_MAX_OID) {
+ if (oid >= OBIF_MAX_OID) {
CERROR("Too large OID %#llx to set REG "DFID"\n",
(unsigned long long)oid, PFID(fid));
return -EBADF;
OpenPOWER on IntegriCloud