diff options
author | majianpeng <majianpeng@gmail.com> | 2013-06-19 03:12:06 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-07-03 18:32:52 -0400 |
commit | c62988ec0910a2d480fecb2f0140a36fcdc7b691 (patch) | |
tree | 29c6471a2b157cdc09fe241891954bd5049e82ff /fs/ceph | |
parent | a1dc1937337a93e699eaa56968b7de6e1a9e77cf (diff) |
ceph: avoid meaningless calling ceph_caps_revoking if sync_mode == WB_SYNC_ALL.
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/addr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 3500b74c32ed..afb2fc241061 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -666,8 +666,8 @@ static int ceph_writepages_start(struct address_space *mapping, | |||
666 | * integrity write (e.g., O_SYNC write or fsync()), or if our | 666 | * integrity write (e.g., O_SYNC write or fsync()), or if our |
667 | * cap is being revoked. | 667 | * cap is being revoked. |
668 | */ | 668 | */ |
669 | do_sync = wbc->sync_mode == WB_SYNC_ALL; | 669 | if ((wbc->sync_mode == WB_SYNC_ALL) || |
670 | if (ceph_caps_revoking(ci, CEPH_CAP_FILE_BUFFER)) | 670 | ceph_caps_revoking(ci, CEPH_CAP_FILE_BUFFER)) |
671 | do_sync = 1; | 671 | do_sync = 1; |
672 | dout("writepages_start %p dosync=%d (mode=%s)\n", | 672 | dout("writepages_start %p dosync=%d (mode=%s)\n", |
673 | inode, do_sync, | 673 | inode, do_sync, |