diff options
author | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-06-02 12:12:57 -0500 |
---|---|---|
committer | Dave Kleikamp <shaggy@austin.ibm.com> | 2005-06-02 12:12:57 -0500 |
commit | 7078253c085c037c070ca4e8bc9e9e7f18aa1e84 (patch) | |
tree | eaf56c1a77b0de6ee82e23cee4433b2c4a47e67e /fs/xfs/xfs_vnodeops.c | |
parent | 259692bd5a2b2c2d351dd90748ba4126bc2a21b9 (diff) | |
parent | 1e86d1c648508fd50e6c9960576b87906a7906ad (diff) |
Merge with /home/shaggy/git/linus-clean/
Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r-- | fs/xfs/xfs_vnodeops.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c index 70092963ca9..25a526629b1 100644 --- a/fs/xfs/xfs_vnodeops.c +++ b/fs/xfs/xfs_vnodeops.c @@ -305,7 +305,7 @@ xfs_setattr( int mandlock_before, mandlock_after; struct xfs_dquot *udqp, *gdqp, *olddquot1, *olddquot2; int file_owner; - int need_iolock = (flags & ATTR_DMI) == 0; + int need_iolock = 1; vp = BHV_TO_VNODE(bdp); vn_trace_entry(vp, __FUNCTION__, (inst_t *)__return_address); @@ -384,6 +384,9 @@ xfs_setattr( */ tp = NULL; lock_flags = XFS_ILOCK_EXCL; + ASSERT(flags & ATTR_NOLOCK ? flags & ATTR_DMI : 1); + if (flags & ATTR_NOLOCK) + need_iolock = 0; if (!(mask & XFS_AT_SIZE)) { if ((mask != (XFS_AT_CTIME|XFS_AT_ATIME|XFS_AT_MTIME)) || (mp->m_flags & XFS_MOUNT_WSYNC)) { @@ -4320,7 +4323,7 @@ xfs_free_file_space( int rt; xfs_fileoff_t startoffset_fsb; xfs_trans_t *tp; - int need_iolock = (attr_flags & ATTR_DMI) == 0; + int need_iolock = 1; vn_trace_entry(XFS_ITOV(ip), __FUNCTION__, (inst_t *)__return_address); mp = ip->i_mount; @@ -4348,8 +4351,12 @@ xfs_free_file_space( return(error); } + ASSERT(attr_flags & ATTR_NOLOCK ? attr_flags & ATTR_DMI : 1); + if (attr_flags & ATTR_NOLOCK) + need_iolock = 0; if (need_iolock) xfs_ilock(ip, XFS_IOLOCK_EXCL); + rounding = MAX((__uint8_t)(1 << mp->m_sb.sb_blocklog), (__uint8_t)NBPP); ilen = len + (offset & (rounding - 1)); |