lkml.org 
[lkml]   [2008]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 09/22] vfs: truncate: dont check immutable twice
    From: Miklos Szeredi <mszeredi@suse.cz>

    vfs_permission(MAY_WRITE) already checked for the inode being
    immutable, so no need to repeat it.

    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    ---
    fs/open.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    Index: linux-2.6/fs/open.c
    ===================================================================
    --- linux-2.6.orig/fs/open.c 2008-05-16 17:50:45.000000000 +0200
    +++ linux-2.6/fs/open.c 2008-05-16 17:50:46.000000000 +0200
    @@ -254,7 +254,7 @@ static long do_sys_truncate(const char _
    goto mnt_drop_write_and_out;

    error = -EPERM;
    - if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
    + if (IS_APPEND(inode))
    goto mnt_drop_write_and_out;

    error = get_write_access(inode);
    --


    \
     
     \ /
      Last update: 2008-05-16 18:39    [W:0.040 / U:0.092 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site