]> git.baikalelectronics.ru Git - kernel.git/commit
[XFS] remove permission check from xfs_change_file_space
authorChristoph Hellwig <hch@infradead.org>
Tue, 5 Feb 2008 01:12:58 +0000 (12:12 +1100)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Thu, 7 Feb 2008 07:21:14 +0000 (18:21 +1100)
commitdbdc7a33d8814ac2a63d911ba051625be038aa72
tree5a42444f8063eea365b75951441f2fdc709e8fbe
parente3ee906fd725870874a5ad40cffe56dfb850d9e3
[XFS] remove permission check from xfs_change_file_space

Both callers of xfs_change_file_space alreaedy do the file->f_mode &
FMODE_WRITE check to ensure we have a file descriptor that has been opened
for write mode, so there is no need to re-check that with xfs_iaccess.
Especially as the later might wrongly deny it for corner cases like file
descriptor passing through unix domain sockets.

SGI-PV: 971186
SGI-Modid: xfs-linux-melb:xfs-kern:30365a

Signed-off-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/xfs_vnodeops.c