Skip to content

Commit

Permalink
[XFS] fix old xfs_setattr mis-merge from irix; mostly harmless esp if…
Browse files Browse the repository at this point in the history
… not

using xfs rt

SGI-PV: 944632
SGI-Modid: xfs-linux:xfs-kern:200983a

Signed-off-by: Eric Sandeen <sandeen@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
  • Loading branch information
Eric Sandeen authored and Nathan Scott committed Nov 2, 2005
1 parent 91e1108 commit e94af02
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/xfs/xfs_vnodeops.c
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,7 @@ xfs_setattr(
/*
* Can't change extent size if any extents are allocated.
*/
if ((ip->i_d.di_nextents || ip->i_delayed_blks) &&
(mask & XFS_AT_EXTSIZE) &&
if (ip->i_d.di_nextents && (mask & XFS_AT_EXTSIZE) &&
((ip->i_d.di_extsize << mp->m_sb.sb_blocklog) !=
vap->va_extsize) ) {
code = XFS_ERROR(EINVAL); /* EFBIG? */
Expand Down Expand Up @@ -562,7 +561,8 @@ xfs_setattr(
/*
* Can't change realtime flag if any extents are allocated.
*/
if (ip->i_d.di_nextents && (mask & XFS_AT_XFLAGS) &&
if ((ip->i_d.di_nextents || ip->i_delayed_blks) &&
(mask & XFS_AT_XFLAGS) &&
(ip->i_d.di_flags & XFS_DIFLAG_REALTIME) !=
(vap->va_xflags & XFS_XFLAG_REALTIME)) {
code = XFS_ERROR(EINVAL); /* EFBIG? */
Expand Down

0 comments on commit e94af02

Please sign in to comment.