mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-28 20:02:17 +00:00
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>
This commit is contained in:
parent
a1dc193733
commit
c62988ec09
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue