aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-08-27 12:57:12 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:10:11 -0400
commit1ea65c96077f9bb5c0e5e224a4da751d269c5f94 (patch)
tree8339a6e94aa875387cd3363f2323a805c8e2f84a /fs/xfs
parent78f7d75e5dd9aa1027e90d0b71d394603933c2ed (diff)
switch xfs_swapext() to fget_light()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_dfrag.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/xfs/xfs_dfrag.c b/fs/xfs/xfs_dfrag.c
index e00de08dc8ac..e6cdf224d7ea 100644
--- a/fs/xfs/xfs_dfrag.c
+++ b/fs/xfs/xfs_dfrag.c
@@ -49,10 +49,10 @@ xfs_swapext(
49{ 49{
50 xfs_inode_t *ip, *tip; 50 xfs_inode_t *ip, *tip;
51 struct file *file, *tmp_file; 51 struct file *file, *tmp_file;
52 int error = 0; 52 int error = 0, fput_needed, fput_needed_tmp;
53 53
54 /* Pull information for the target fd */ 54 /* Pull information for the target fd */
55 file = fget((int)sxp->sx_fdtarget); 55 file = fget_light((int)sxp->sx_fdtarget, &fput_needed);
56 if (!file) { 56 if (!file) {
57 error = XFS_ERROR(EINVAL); 57 error = XFS_ERROR(EINVAL);
58 goto out; 58 goto out;
@@ -65,7 +65,7 @@ xfs_swapext(
65 goto out_put_file; 65 goto out_put_file;
66 } 66 }
67 67
68 tmp_file = fget((int)sxp->sx_fdtmp); 68 tmp_file = fget_light((int)sxp->sx_fdtmp, &fput_needed_tmp);
69 if (!tmp_file) { 69 if (!tmp_file) {
70 error = XFS_ERROR(EINVAL); 70 error = XFS_ERROR(EINVAL);
71 goto out_put_file; 71 goto out_put_file;
@@ -105,9 +105,9 @@ xfs_swapext(
105 error = xfs_swap_extents(ip, tip, sxp); 105 error = xfs_swap_extents(ip, tip, sxp);
106 106
107 out_put_tmp_file: 107 out_put_tmp_file:
108 fput(tmp_file); 108 fput_light(tmp_file, fput_needed_tmp);
109 out_put_file: 109 out_put_file:
110 fput(file); 110 fput_light(file, fput_needed);
111 out: 111 out:
112 return error; 112 return error;
113} 113}