aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/linux-2.6/xfs_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_ioctl.c')
-rw-r--r--fs/xfs/linux-2.6/xfs_ioctl.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c
index 48799ba7e3e6..d3438c72dcaf 100644
--- a/fs/xfs/linux-2.6/xfs_ioctl.c
+++ b/fs/xfs/linux-2.6/xfs_ioctl.c
@@ -311,11 +311,10 @@ xfs_open_by_handle(
311 return new_fd; 311 return new_fd;
312 } 312 }
313 313
314 dentry = d_alloc_anon(inode); 314 dentry = d_obtain_alias(inode);
315 if (dentry == NULL) { 315 if (IS_ERR(dentry)) {
316 iput(inode);
317 put_unused_fd(new_fd); 316 put_unused_fd(new_fd);
318 return -XFS_ERROR(ENOMEM); 317 return PTR_ERR(dentry);
319 } 318 }
320 319
321 /* Ensure umount returns EBUSY on umounts while this file is open. */ 320 /* Ensure umount returns EBUSY on umounts while this file is open. */