summaryrefslogtreecommitdiffstats
path: root/fs/ceph/addr.c
diff options
context:
space:
mode:
authormajianpeng <majianpeng@gmail.com>2013-06-19 15:12:06 +0800
committerSage Weil <sage@inktank.com>2013-07-03 15:32:52 -0700
commitc62988ec0910a2d480fecb2f0140a36fcdc7b691 (patch)
tree29c6471a2b157cdc09fe241891954bd5049e82ff /fs/ceph/addr.c
parenta1dc1937337a93e699eaa56968b7de6e1a9e77cf (diff)
downloadop-kernel-dev-c62988ec0910a2d480fecb2f0140a36fcdc7b691.zip
op-kernel-dev-c62988ec0910a2d480fecb2f0140a36fcdc7b691.tar.gz
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/addr.c')
-rw-r--r--fs/ceph/addr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 3500b74..afb2fc2 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -666,8 +666,8 @@ static int ceph_writepages_start(struct address_space *mapping,
* integrity write (e.g., O_SYNC write or fsync()), or if our
* cap is being revoked.
*/
- do_sync = wbc->sync_mode == WB_SYNC_ALL;
- if (ceph_caps_revoking(ci, CEPH_CAP_FILE_BUFFER))
+ if ((wbc->sync_mode == WB_SYNC_ALL) ||
+ ceph_caps_revoking(ci, CEPH_CAP_FILE_BUFFER))
do_sync = 1;
dout("writepages_start %p dosync=%d (mode=%s)\n",
inode, do_sync,
OpenPOWER on IntegriCloud