From 859e5b2d20552f8df0ed2afda0f1a7c3c7d86678 Mon Sep 17 00:00:00 2001 From: Hongchao Zhang Date: Mon, 20 Aug 2012 15:40:48 +0800 Subject: [PATCH] LU-657 obdfilter: fix bug in previous patch in the merged patch http://review.whamcloud.com/#change,3446, the usage of fsfilt_commit_wait is wrong, and it doesn't stop the journal firstly. Signed-off-by: Hongchao Zhang Change-Id: I3a36edf7049466880c27c14bb7f99966aa75d4f1 Reviewed-on: http://review.whamcloud.com/3692 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong --- lustre/obdfilter/filter_io.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index df261ab..23947d5 100644 --- a/lustre/obdfilter/filter_io.c +++ b/lustre/obdfilter/filter_io.c @@ -786,12 +786,11 @@ retry: CDEBUG(D_INODE, "retry after commit pending journals"); retries = 1; - handle = fsfilt_start_log(obd, dentry->d_inode, - FSFILT_OP_SETATTR, NULL, 1); - if (handle != NULL) { - fsfilt_commit_wait(obd, dentry->d_inode, handle); + handle = fsfilt_start(obd, dentry->d_inode, + FSFILT_OP_SETATTR, NULL); + if (handle != NULL && + fsfilt_commit(obd, dentry->d_inode, handle, 1) == 0) goto retry; - } } filter_fmd_put(exp, fmd); -- 1.8.3.1