lkml.org 
[lkml]   [2008]   [May]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 14/15] vfs: utimes immutable fix
    From: Miklos Szeredi <mszeredi@suse.cz>

    If updating file times to the current time and using a file
    descriptor, then don't check for immutable inode, only if the file is
    opened for write. In this case immutability has been checked at open
    time. This is the same as how write() and ftruncate() are handled.

    Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
    CC: Ulrich Drepper <drepper@redhat.com>
    ---
    fs/utimes.c | 3 ---
    1 file changed, 3 deletions(-)

    Index: linux-2.6/fs/utimes.c
    ===================================================================
    --- linux-2.6.orig/fs/utimes.c 2008-05-05 11:29:28.000000000 +0200
    +++ linux-2.6/fs/utimes.c 2008-05-05 11:29:28.000000000 +0200
    @@ -110,9 +110,6 @@ static int do_fd_utimes(int fd, struct t
    struct inode *inode = file->f_path.dentry->d_inode;

    error = -EACCES;
    - if (IS_IMMUTABLE(inode))
    - goto out_fput;
    -
    if (!is_owner_or_cap(inode) && !(file->f_mode & FMODE_WRITE))
    goto out_fput;
    }
    --


    \
     
     \ /
      Last update: 2008-05-05 12:01    [W:0.034 / U:90.648 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site