Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=199037c598daf5f3602dace68c331665a4f4f0c1
Commit:     199037c598daf5f3602dace68c331665a4f4f0c1
Parent:     9742bb93da27737fe490eab2af9fba1efa243dcb
Author:     Christoph Hellwig <[EMAIL PROTECTED]>
AuthorDate: Tue Feb 5 12:12:58 2008 +1100
Committer:  Lachlan McIlroy <[EMAIL PROTECTED]>
CommitDate: Thu Feb 7 18:21:14 2008 +1100

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Lachlan McIlroy <[EMAIL PROTECTED]>
---
 fs/xfs/xfs_vnodeops.c |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)

diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 6b71d9f..076555e 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -4317,21 +4317,9 @@ xfs_change_file_space(
 
        xfs_itrace_entry(ip);
 
-       /*
-        * must be a regular file and have write permission
-        */
        if (!S_ISREG(ip->i_d.di_mode))
                return XFS_ERROR(EINVAL);
 
-       xfs_ilock(ip, XFS_ILOCK_SHARED);
-
-       if ((error = xfs_iaccess(ip, S_IWUSR, credp))) {
-               xfs_iunlock(ip, XFS_ILOCK_SHARED);
-               return error;
-       }
-
-       xfs_iunlock(ip, XFS_ILOCK_SHARED);
-
        switch (bf->l_whence) {
        case 0: /*SEEK_SET*/
                break;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to