From: Hongchao Zhang Date: Mon, 20 Aug 2012 07:40:48 +0000 (+0800) Subject: LU-657 obdfilter: fix bug in previous patch X-Git-Tag: 2.3.51~166 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=859e5b2d20552f8df0ed2afda0f1a7c3c7d86678 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 --- 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);