xfs: tiny cleanup for xfs_link

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>
This commit is contained in:
Christoph Hellwig 2009-02-04 09:34:20 +01:00 committed by Christoph Hellwig
parent b93b6e434c
commit cb3f35bb3b
1 changed files with 4 additions and 2 deletions

View 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;