Commit ff9b5814 authored by Stephen Lord's avatar Stephen Lord Committed by Stephen Lord

[XFS] remove an impossible code path from mkdir and link paths,

spotted by Al Viro.

SGI Modid: 2.5.x-xfs:slinx:155518a
parent 9417522a
......@@ -2813,7 +2813,6 @@ xfs_mkdir(
xfs_inode_t *cdp; /* inode of created dir */
vnode_t *cvp; /* vnode of created dir */
xfs_trans_t *tp;
xfs_dev_t rdev;
xfs_mount_t *mp;
int cancel_flags;
int error;
......@@ -2912,10 +2911,9 @@ xfs_mkdir(
/*
* create the directory inode.
*/
rdev = (vap->va_mask & XFS_AT_RDEV) ? vap->va_rdev : 0;
error = xfs_dir_ialloc(&tp, dp,
MAKEIMODE(vap->va_type,vap->va_mode), 2,
rdev, credp, prid, resblks > 0,
0, credp, prid, resblks > 0,
&cdp, NULL);
if (error) {
if (error == ENOSPC)
......@@ -3336,7 +3334,6 @@ xfs_symlink(
xfs_inode_t *ip;
int error;
int pathlen;
xfs_dev_t rdev;
xfs_bmap_free_t free_list;
xfs_fsblock_t first_block;
boolean_t dp_joined_to_trans;
......@@ -3479,10 +3476,8 @@ xfs_symlink(
/*
* Allocate an inode for the symlink.
*/
rdev = (vap->va_mask & XFS_AT_RDEV) ? vap->va_rdev : 0;
error = xfs_dir_ialloc(&tp, dp, IFLNK | (vap->va_mode&~IFMT),
1, rdev, credp, prid, resblks > 0, &ip, NULL);
1, 0, credp, prid, resblks > 0, &ip, NULL);
if (error) {
if (error == ENOSPC)
goto error_return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment