Whamcloud - gitweb
LU-657 obdfilter: fix bug in previous patch
authorHongchao Zhang <hongchao.zhang@whamcloud.com>
Mon, 20 Aug 2012 07:40:48 +0000 (15:40 +0800)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 23 Aug 2012 16:07:41 +0000 (12:07 -0400)
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 <hongchao.zhang@whamcloud.com>
Change-Id: I3a36edf7049466880c27c14bb7f99966aa75d4f1
Reviewed-on: http://review.whamcloud.com/3692
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Jinshan Xiong <jinshan.xiong@whamcloud.com>
lustre/obdfilter/filter_io.c

index df261ab..23947d5 100644 (file)
@@ -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);