ceph: do_sync is never initialized
Subsystems (2)
PATCH 1/1 ceph: do_sync is never initialized
Probably this code was syncing a lot more often then intended because the do_sync variable wasn't set to zero.
---
Static checker stuff. Not tested. It's surprising that GCC doesn't catch this.
fs/ceph/addr.c +1 -1
@@ -673,7 +673,7 @@ static int ceph_writepages_start(struct address_space *mapping,int rc =0 ;unsigned wsize =1 << inode->i_blkbits;struct ceph_osd_request *req =NULL ; -int do_sync; +int do_sync =0 ;u64 truncate_size, snap_size;u32 truncate_seq;
Ilya Dryomov
AppliedQuoted 14 lines · Dan Carpenter
Probably this code was syncing a lot more often then intended because the
do_syncvariable wasn't set to zero.Fixes c62988ec0910 ('ceph: avoid meaningless calling ceph_caps_revoking if sync_mode == WB_SYNC_ALL.')Signed-off-by Dan Carpenter <[email protected]>---
Static checker stuff. Not tested. It's surprising that GCC doesn't catch this.fs/ceph/addr.c +0
-0
fs/ceph/addr.c static int ceph_writepages_start(struct address_space *mapping, · line 678
Quoted 7 lines
fs/ceph/addr.c +1
-1@@ -673,7 +673,7 @@ static int ceph_writepages_start(struct address_space *mapping,int rc =0 ;unsigned wsize =1 << inode->i_blkbits;struct ceph_osd_request *req =NULL ; -int do_sync; +int do_sync =0 ;u64 truncate_size, snap_size;u32 truncate_seq;
Applied, also added a stable tag for 3.11+.
Thanks,
Ilya
Quoted 5 lines
fs/ceph/addr.c +0
-1--To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html