diff options
author | Christoph Hellwig <hch@lst.de> | 2009-02-04 03:34:20 -0500 |
---|---|---|
committer | Christoph Hellwig <hch@brick.lst.de> | 2009-02-04 03:34:20 -0500 |
commit | cb3f35bb3bf0759e00cd4f68155da9b636421f84 (patch) | |
tree | 08b307dff77bf567ff2cb7a624010c4654690eaa /fs/xfs | |
parent | b93b6e434c046459cf3111c76dce46ba4abcb2b6 (diff) |
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>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 0e55c5d7db5f..4229408664ea 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c | |||
@@ -2004,8 +2004,10 @@ xfs_link( | |||
2004 | /* Return through std_return after this point. */ | 2004 | /* Return through std_return after this point. */ |
2005 | 2005 | ||
2006 | error = XFS_QM_DQATTACH(mp, sip, 0); | 2006 | error = XFS_QM_DQATTACH(mp, sip, 0); |
2007 | if (!error && sip != tdp) | 2007 | if (error) |
2008 | error = XFS_QM_DQATTACH(mp, tdp, 0); | 2008 | goto std_return; |
2009 | |||
2010 | error = XFS_QM_DQATTACH(mp, tdp, 0); | ||
2009 | if (error) | 2011 | if (error) |
2010 | goto std_return; | 2012 | goto std_return; |
2011 | 2013 | ||