aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 19:09:16 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-27 19:09:16 -0700
commit73a0e405dce7d720808536b708f7c738b413b1a2 (patch)
tree60cc93e993e89b0c83a549bd65647879ce37d9cc /fs/xfs/xfs_vnodeops.c
parent03529d9f66b7995c67ddceb8f83258df3c9915da (diff)
parent5493a0fcba8a94baa5c1d80aca21d6ae4b3b573e (diff)
downloadkernel_samsung_smdk4412-73a0e405dce7d720808536b708f7c738b413b1a2.zip
kernel_samsung_smdk4412-73a0e405dce7d720808536b708f7c738b413b1a2.tar.gz
kernel_samsung_smdk4412-73a0e405dce7d720808536b708f7c738b413b1a2.tar.bz2
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/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 00a6b7d..23cfa58 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -2603,8 +2603,7 @@ xfs_link(
vn_trace_entry(src_vp, __FUNCTION__, (inst_t *)__return_address);
target_namelen = VNAMELEN(dentry);
- if (VN_ISDIR(src_vp))
- return XFS_ERROR(EPERM);
+ ASSERT(!VN_ISDIR(src_vp));
sip = xfs_vtoi(src_vp);
tdp = XFS_BHVTOI(target_dir_bdp);
@@ -2699,9 +2698,8 @@ xfs_link(
xfs_trans_log_inode(tp, tdp, XFS_ILOG_CORE);
error = xfs_bumplink(tp, sip);
- if (error) {
+ if (error)
goto abort_return;
- }
/*
* If this is a synchronous mount, make sure that the
@@ -2719,9 +2717,8 @@ xfs_link(
}
error = xfs_trans_commit(tp, XFS_TRANS_RELEASE_LOG_RES, NULL);
- if (error) {
+ if (error)
goto std_return;
- }
/* Fall through to std_return with error = 0. */
std_return:
@@ -2742,6 +2739,8 @@ std_return:
xfs_trans_cancel(tp, cancel_flags);
goto std_return;
}
+
+
/*
* xfs_mkdir
*