Loading fs/xfs/linux-2.6/xfs_iops.c +11 −12 Original line number Diff line number Diff line Loading @@ -395,25 +395,24 @@ xfs_vn_link( struct inode *dir, struct dentry *dentry) { struct inode *ip; /* inode of guy being linked to */ bhv_vnode_t *vp; /* vp of name being linked */ struct inode *inode; /* inode of guy being linked to */ int error; ip = old_dentry->d_inode; /* inode being linked to */ vp = vn_from_inode(ip); inode = old_dentry->d_inode; VN_HOLD(vp); error = xfs_link(XFS_I(dir), vp, dentry); igrab(inode); error = xfs_link(XFS_I(dir), XFS_I(inode), dentry); if (unlikely(error)) { VN_RELE(vp); } else { xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED); xfs_validate_fields(ip); d_instantiate(dentry, ip); } iput(inode); return -error; } xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED); xfs_validate_fields(inode); d_instantiate(dentry, inode); return 0; } STATIC int xfs_vn_unlink( struct inode *dir, Loading fs/xfs/xfs_vnodeops.c +5 −7 Original line number Diff line number Diff line Loading @@ -2471,12 +2471,10 @@ xfs_remove( int xfs_link( xfs_inode_t *tdp, bhv_vnode_t *src_vp, xfs_inode_t *sip, bhv_vname_t *dentry) { bhv_vnode_t *target_dir_vp = XFS_ITOV(tdp); xfs_mount_t *mp = tdp->i_mount; xfs_inode_t *sip = xfs_vtoi(src_vp); xfs_trans_t *tp; xfs_inode_t *ips[2]; int error; Loading @@ -2489,10 +2487,10 @@ xfs_link( int target_namelen; xfs_itrace_entry(tdp); xfs_itrace_entry(xfs_vtoi(src_vp)); xfs_itrace_entry(sip); target_namelen = VNAMELEN(dentry); ASSERT(!VN_ISDIR(src_vp)); ASSERT(!S_ISDIR(sip->i_d.di_mode)); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); Loading Loading @@ -2544,8 +2542,8 @@ xfs_link( * xfs_trans_cancel will both unlock the inodes and * decrement the associated ref counts. */ VN_HOLD(src_vp); VN_HOLD(target_dir_vp); IHOLD(sip); IHOLD(tdp); xfs_trans_ijoin(tp, sip, XFS_ILOCK_EXCL); xfs_trans_ijoin(tp, tdp, XFS_ILOCK_EXCL); Loading fs/xfs/xfs_vnodeops.h +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ int xfs_lookup(struct xfs_inode *dp, bhv_vname_t *dentry, int xfs_create(struct xfs_inode *dp, bhv_vname_t *dentry, mode_t mode, xfs_dev_t rdev, struct xfs_inode **ipp, struct cred *credp); int xfs_remove(struct xfs_inode *dp, bhv_vname_t *dentry); int xfs_link(struct xfs_inode *tdp, bhv_vnode_t *src_vp, int xfs_link(struct xfs_inode *tdp, struct xfs_inode *sip, bhv_vname_t *dentry); int xfs_mkdir(struct xfs_inode *dp, bhv_vname_t *dentry, mode_t mode, struct xfs_inode **ipp, struct cred *credp); Loading Loading
fs/xfs/linux-2.6/xfs_iops.c +11 −12 Original line number Diff line number Diff line Loading @@ -395,25 +395,24 @@ xfs_vn_link( struct inode *dir, struct dentry *dentry) { struct inode *ip; /* inode of guy being linked to */ bhv_vnode_t *vp; /* vp of name being linked */ struct inode *inode; /* inode of guy being linked to */ int error; ip = old_dentry->d_inode; /* inode being linked to */ vp = vn_from_inode(ip); inode = old_dentry->d_inode; VN_HOLD(vp); error = xfs_link(XFS_I(dir), vp, dentry); igrab(inode); error = xfs_link(XFS_I(dir), XFS_I(inode), dentry); if (unlikely(error)) { VN_RELE(vp); } else { xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED); xfs_validate_fields(ip); d_instantiate(dentry, ip); } iput(inode); return -error; } xfs_iflags_set(XFS_I(dir), XFS_IMODIFIED); xfs_validate_fields(inode); d_instantiate(dentry, inode); return 0; } STATIC int xfs_vn_unlink( struct inode *dir, Loading
fs/xfs/xfs_vnodeops.c +5 −7 Original line number Diff line number Diff line Loading @@ -2471,12 +2471,10 @@ xfs_remove( int xfs_link( xfs_inode_t *tdp, bhv_vnode_t *src_vp, xfs_inode_t *sip, bhv_vname_t *dentry) { bhv_vnode_t *target_dir_vp = XFS_ITOV(tdp); xfs_mount_t *mp = tdp->i_mount; xfs_inode_t *sip = xfs_vtoi(src_vp); xfs_trans_t *tp; xfs_inode_t *ips[2]; int error; Loading @@ -2489,10 +2487,10 @@ xfs_link( int target_namelen; xfs_itrace_entry(tdp); xfs_itrace_entry(xfs_vtoi(src_vp)); xfs_itrace_entry(sip); target_namelen = VNAMELEN(dentry); ASSERT(!VN_ISDIR(src_vp)); ASSERT(!S_ISDIR(sip->i_d.di_mode)); if (XFS_FORCED_SHUTDOWN(mp)) return XFS_ERROR(EIO); Loading Loading @@ -2544,8 +2542,8 @@ xfs_link( * xfs_trans_cancel will both unlock the inodes and * decrement the associated ref counts. */ VN_HOLD(src_vp); VN_HOLD(target_dir_vp); IHOLD(sip); IHOLD(tdp); xfs_trans_ijoin(tp, sip, XFS_ILOCK_EXCL); xfs_trans_ijoin(tp, tdp, XFS_ILOCK_EXCL); Loading
fs/xfs/xfs_vnodeops.h +1 −1 Original line number Diff line number Diff line Loading @@ -28,7 +28,7 @@ int xfs_lookup(struct xfs_inode *dp, bhv_vname_t *dentry, int xfs_create(struct xfs_inode *dp, bhv_vname_t *dentry, mode_t mode, xfs_dev_t rdev, struct xfs_inode **ipp, struct cred *credp); int xfs_remove(struct xfs_inode *dp, bhv_vname_t *dentry); int xfs_link(struct xfs_inode *tdp, bhv_vnode_t *src_vp, int xfs_link(struct xfs_inode *tdp, struct xfs_inode *sip, bhv_vname_t *dentry); int xfs_mkdir(struct xfs_inode *dp, bhv_vname_t *dentry, mode_t mode, struct xfs_inode **ipp, struct cred *credp); Loading