From ad4a8ac4e9d9cffb0a4c9ebebc6bda9d8dbbfe99 Mon Sep 17 00:00:00 2001 From: Eric Sandeen Date: Fri, 2 Sep 2005 16:41:16 +1000 Subject: [PATCH] [XFS] Fix check for writeable file in xfs_ioc_space ioctl code SGI-PV: 938905 SGI-Modid: xfs-linux:xfs-kern:195240a Signed-off-by: Eric Sandeen Signed-off-by: Nathan Scott --- fs/xfs/linux-2.6/xfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/xfs/linux-2.6/xfs_ioctl.c b/fs/xfs/linux-2.6/xfs_ioctl.c index 05a447e51c..35cbd88e1a 100644 --- a/fs/xfs/linux-2.6/xfs_ioctl.c +++ b/fs/xfs/linux-2.6/xfs_ioctl.c @@ -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) -- 2.39.5