From: Dan Carpenter Date: Fri, 28 Nov 2014 08:33:34 +0000 (+0300) Subject: ceph: do_sync is never initialized X-Git-Tag: v3.12.37~135 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f844de9aa69cd95c52636e5b4faeaf1353477252;p=thirdparty%2Fkernel%2Fstable.git ceph: do_sync is never initialized commit 021b77bee210843bed1ea91b5cad58235ff9c8e5 upstream. Probably this code was syncing a lot more often then intended because the do_sync variable 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 Signed-off-by: Ilya Dryomov Signed-off-by: Jiri Slaby --- diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index ec3ba43b9faae..f757dffb715ea 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -672,7 +672,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;