mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
ceph: fix broken comparison in readdir loop
Both off and fi->offset are unsigned, so the difference is always >= 0. Compare them directly instead of the sign of the difference. Signed-off-by: Sage Weil <[email protected]>
This commit is contained in:
parent
31456665a0
commit
da39822c65
1 changed files with 1 additions and 1 deletions
|
|
@ -360,7 +360,7 @@ more:
|
|||
rinfo = &fi->last_readdir->r_reply_info;
|
||||
dout("readdir frag %x num %d off %d chunkoff %d\n", frag,
|
||||
rinfo->dir_nr, off, fi->offset);
|
||||
while (off - fi->offset >= 0 && off - fi->offset < rinfo->dir_nr) {
|
||||
while (off >= fi->offset && off - fi->offset < rinfo->dir_nr) {
|
||||
u64 pos = ceph_make_fpos(frag, off);
|
||||
struct ceph_mds_reply_inode *in =
|
||||
rinfo->dir_in[off - fi->offset].in;
|
||||
|
|
|
|||
Loading…
Reference in a new issue