ceph: do_sync is never initialized
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 28 Nov 2014 08:33:34 +0000 (11:33 +0300)
committerIlya Dryomov <idryomov@redhat.com>
Wed, 17 Dec 2014 17:09:53 +0000 (20:09 +0300)
Probably this code was syncing a lot more often then intended because
the do_sync variable wasn't set to zero.

Cc: stable@vger.kernel.org # v3.11+
Fixes: c62988ec0910 ('ceph: avoid meaningless calling ceph_caps_revoking if sync_mode == WB_SYNC_ALL.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
fs/ceph/addr.c

index 70a3b441261ba26e5c25430e34b3126f99585c6b..f5013d92a7e6b73d9c4369683f6aac987afbd287 100644 (file)
@@ -689,7 +689,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;