diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-01-16 10:12:24 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-02-04 09:31:18 -0800 |
commit | 7f660dd7d3b54ebfe7d8a65104fe3f553f47deec (patch) | |
tree | 9bf5f58e59ac5160d3c0526de68e3d1f65a3a068 | |
parent | 5ee2023df7da5586a18c8d4515f5e41a1ba6231b (diff) |
xfs: get rid of cross_renameinode-refactor_2019-02-04
Get rid of the largely pointless xfs_cross_rename now that we've
refactored its parent.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
-rw-r--r-- | fs/xfs/xfs_inode.c | 42 |
1 files changed, 6 insertions, 36 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index ccf04aaa94d1..a1d123aeeb0d 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c @@ -2168,36 +2168,6 @@ xfs_finish_rename( } /* - * xfs_cross_rename() - * - * responsible for handling RENAME_EXCHANGE flag in renameat2() sytemcall - */ -STATIC int -xfs_cross_rename( - struct xfs_trans *tp, - struct xfs_inode *dp1, - struct xfs_name *name1, - struct xfs_inode *ip1, - struct xfs_inode *dp2, - struct xfs_name *name2, - struct xfs_inode *ip2, - int spaceres) -{ - int error; - - error = xfs_dir_exchange(tp, dp1, name1, ip1, dp2, name2, ip2, - spaceres); - if (error) - goto out_trans_abort; - - return xfs_finish_rename(tp); - -out_trans_abort: - xfs_trans_cancel(tp); - return error; -} - -/* * xfs_rename_alloc_whiteout() * * Return a referenced, unlinked, unlocked inode that that can be used as a @@ -2337,12 +2307,12 @@ xfs_rename( /* RENAME_EXCHANGE is unique from here on. */ if (flags & RENAME_EXCHANGE) - return xfs_cross_rename(tp, src_dp, src_name, src_ip, - target_dp, target_name, target_ip, - spaceres); - - error = xfs_dir_rename(tp, src_dp, src_name, src_ip, target_dp, - target_name, target_ip, spaceres, wip); + error = xfs_dir_exchange(tp, src_dp, src_name, src_ip, + target_dp, target_name, target_ip, + spaceres); + else + error = xfs_dir_rename(tp, src_dp, src_name, src_ip, target_dp, + target_name, target_ip, spaceres, wip); if (error) goto out_trans_cancel; |