]> git.karo-electronics.de Git - linux-beck.git/commitdiff
xfs: tiny cleanup for xfs_link
authorChristoph Hellwig <hch@lst.de>
Wed, 4 Feb 2009 08:34:20 +0000 (09:34 +0100)
committerChristoph Hellwig <hch@brick.lst.de>
Wed, 4 Feb 2009 08:34:20 +0000 (09:34 +0100)
The source and target inodes are guaranteed to never be the same by the VFS,
so no need to check for that (and we would get into bad trouble later anyway
if that were the case).  Also clean up the error handling to use two gotos
instead of nested conditions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
fs/xfs/xfs_vnodeops.c

index 0e55c5d7db5fd2bbcc13e88baa38a915c2db94b7..4229408664ea2b61d9a8295bdc652bca0931ac06 100644 (file)
@@ -2004,8 +2004,10 @@ xfs_link(
        /* Return through std_return after this point. */
 
        error = XFS_QM_DQATTACH(mp, sip, 0);
-       if (!error && sip != tdp)
-               error = XFS_QM_DQATTACH(mp, tdp, 0);
+       if (error)
+               goto std_return;
+
+       error = XFS_QM_DQATTACH(mp, tdp, 0);
        if (error)
                goto std_return;