]> rtime.felk.cvut.cz Git - zynq/linux.git/blobdiff - fs/xfs/xfs_inode.c
Merge tag 'v4.0.8' into xlnx_4.0.8-rt6
[zynq/linux.git] / fs / xfs / xfs_inode.c
index 6163767aa8562f6d611a1442ed4f299aa85bceea..b1edda7890f41b60ea57e82bb5f1c22a0ddabbb6 100644 (file)
@@ -1889,21 +1889,17 @@ xfs_inactive(
        /*
         * If there are attributes associated with the file then blow them away
         * now.  The code calls a routine that recursively deconstructs the
-        * attribute fork.  We need to just commit the current transaction
-        * because we can't use it for xfs_attr_inactive().
+        * attribute fork. If also blows away the in-core attribute fork.
         */
-       if (ip->i_d.di_anextents > 0) {
-               ASSERT(ip->i_d.di_forkoff != 0);
-
+       if (XFS_IFORK_Q(ip)) {
                error = xfs_attr_inactive(ip);
                if (error)
                        return;
        }
 
-       if (ip->i_afp)
-               xfs_idestroy_fork(ip, XFS_ATTR_FORK);
-
+       ASSERT(!ip->i_afp);
        ASSERT(ip->i_d.di_anextents == 0);
+       ASSERT(ip->i_d.di_forkoff == 0);
 
        /*
         * Free the inode.