diff mbox

ceph: avoid meaningless calling ceph_caps_revoking if sync_mode == WB_SYNC_ALL.

Message ID 201306191512024406391@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

majianpeng June 19, 2013, 7:12 a.m. UTC
Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>

---
 fs/ceph/addr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
1.8.3.rc1.44.gb387c77

Comments

Sage Weil June 19, 2013, 3:57 p.m. UTC | #1
Applied, thanks!

sage

On Wed, 19 Jun 2013, majianpeng wrote:

> Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>
> ---
>  fs/ceph/addr.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
> index 3e68ac1..25fa8b8 100644
> --- a/fs/ceph/addr.c
> +++ b/fs/ceph/addr.c
> @@ -677,8 +677,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,
> -- 
> 1.8.3.rc1.44.gb387c77
> N????y????b?????v?????{.n??????z??ay????????j???f????????????????:+v??????????zZ+??????"?!?
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index 3e68ac1..25fa8b8 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -677,8 +677,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,