diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-27 22:09:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-27 22:09:16 -0400 |
commit | 73a0e405dce7d720808536b708f7c738b413b1a2 (patch) | |
tree | 60cc93e993e89b0c83a549bd65647879ce37d9cc /fs/xfs/linux-2.6/xfs_iops.c | |
parent | 03529d9f66b7995c67ddceb8f83258df3c9915da (diff) | |
parent | 5493a0fcba8a94baa5c1d80aca21d6ae4b3b573e (diff) |
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( | |||
419 | int error; | 419 | int error; |
420 | 420 | ||
421 | ip = old_dentry->d_inode; /* inode being linked to */ | 421 | ip = old_dentry->d_inode; /* inode being linked to */ |
422 | if (S_ISDIR(ip->i_mode)) | ||
423 | return -EPERM; | ||
424 | |||
425 | tdvp = vn_from_inode(dir); | 422 | tdvp = vn_from_inode(dir); |
426 | vp = vn_from_inode(ip); | 423 | vp = vn_from_inode(ip); |
427 | 424 | ||
425 | VN_HOLD(vp); | ||
428 | error = bhv_vop_link(tdvp, vp, dentry, NULL); | 426 | error = bhv_vop_link(tdvp, vp, dentry, NULL); |
429 | if (likely(!error)) { | 427 | if (unlikely(error)) { |
428 | VN_RELE(vp); | ||
429 | } else { | ||
430 | VMODIFY(tdvp); | 430 | VMODIFY(tdvp); |
431 | VN_HOLD(vp); | ||
432 | xfs_validate_fields(ip, &vattr); | 431 | xfs_validate_fields(ip, &vattr); |
433 | d_instantiate(dentry, ip); | 432 | d_instantiate(dentry, ip); |
434 | } | 433 | } |