Skip to content

Commit

Permalink
[XFS] Fix check for writeable file in xfs_ioc_space ioctl code
Browse files Browse the repository at this point in the history
SGI-PV: 938905
SGI-Modid: xfs-linux:xfs-kern:195240a

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 Sep 2, 2005
1 parent 3bdbfb1 commit ad4a8ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/xfs/linux-2.6/xfs_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ xfs_ioc_space(
if (vp->v_inode.i_flags & (S_IMMUTABLE|S_APPEND))
return -XFS_ERROR(EPERM);

if (!(filp->f_flags & FMODE_WRITE))
if (!(filp->f_mode & FMODE_WRITE))
return -XFS_ERROR(EBADF);

if (vp->v_type != VREG)
Expand Down

0 comments on commit ad4a8ac

Please sign in to comment.