Skip to content

Commit

Permalink
ceph: avoid meaningless calling ceph_caps_revoking if sync_mode == WB…
Browse files Browse the repository at this point in the history
…_SYNC_ALL.

Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
Reviewed-by: Sage Weil <sage@inktank.com>
  • Loading branch information
majianpeng authored and Sage Weil committed Jul 3, 2013
1 parent a1dc193 commit c62988e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c62988e

Please sign in to comment.