diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-28 04:09:16 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-28 04:09:16 +0200 |
commit | 73a0e405dce7d720808536b708f7c738b413b1a2 (patch) | |
tree | 60cc93e993e89b0c83a549bd65647879ce37d9cc /fs/xfs/linux-2.6/xfs_iops.c | |
parent | Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/... (diff) | |
parent | [XFS] Fixup whitespace damage in log_write, remove final warning. (diff) | |
download | linux-73a0e405dce7d720808536b708f7c738b413b1a2.tar.xz linux-73a0e405dce7d720808536b708f7c738b413b1a2.zip |
Merge git://oss.sgi.com:8090/nathans/xfs-2.6
* git://oss.sgi.com:8090/nathans/xfs-2.6:
[XFS] Fixup whitespace damage in log_write, remove final warning.
[XFS] Rework code snippets slightly to remove remaining recent-gcc
[XFS] Fix realtime subvolume expansion, a porting bug b0rked it. Coverity
[XFS] Remove a race condition where a linked inode could BUG_ON in
[XFS] Remove redundant directory checks from inode link operation.
[XFS] Remove a couple of no-longer-used macros.
[XFS] Reduce size of xfs_trans_t structure. * remove ->t_forw, ->t_back --
[XFS] remove unused behaviour lock - shrink XFS vnode as a side effect.
[XFS] * There is trivial "inode => vnode => inode" conversion, but only
[XFS] link(2) on directory is banned in VFS.
Diffstat (limited to 'fs/xfs/linux-2.6/xfs_iops.c')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 12810baeb5d4..d9180020de63 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c @@ -419,16 +419,15 @@ xfs_vn_link( int error; ip = old_dentry->d_inode; /* inode being linked to */ - if (S_ISDIR(ip->i_mode)) - return -EPERM; - tdvp = vn_from_inode(dir); vp = vn_from_inode(ip); + VN_HOLD(vp); error = bhv_vop_link(tdvp, vp, dentry, NULL); - if (likely(!error)) { + if (unlikely(error)) { + VN_RELE(vp); + } else { VMODIFY(tdvp); - VN_HOLD(vp); xfs_validate_fields(ip, &vattr); d_instantiate(dentry, ip); } |