提交 ad4a8ac4 编写于 作者: E Eric Sandeen 提交者: Nathan Scott

[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: NEric Sandeen <sandeen@sgi.com>
Signed-off-by: NNathan Scott <nathans@sgi.com>
上级 3bdbfb10
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册