summaryrefslogtreecommitdiff
path: root/fs/utimes.c
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2008-07-01 15:01:29 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2008-07-26 20:53:28 -0400
commitbeb29e058c35ab69e96e455a12ccf7505f6de425 (patch)
tree0da9869b7e0422c34423a02216db1a758a55a95a /fs/utimes.c
parentb1da47e29e467f1ec36dc78d009bfb109fd533c7 (diff)
downloadkernel-common-beb29e058c35ab69e96e455a12ccf7505f6de425.tar.gz
kernel-common-beb29e058c35ab69e96e455a12ccf7505f6de425.tar.bz2
kernel-common-beb29e058c35ab69e96e455a12ccf7505f6de425.zip
[patch 4/4] vfs: immutable inode checking cleanup
Move the immutable and append-only checks from chmod, chown and utimes into notify_change(). Checks for immutable and append-only files are always performed by the VFS and not by the filesystem (see permission() and may_...() in namei.c), so these belong in notify_change(), and not in inode_change_ok(). This should be completely equivalent. CC: Ulrich Drepper <drepper@redhat.com> CC: Michael Kerrisk <mtk.manpages@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/utimes.c')
-rw-r--r--fs/utimes.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/fs/utimes.c b/fs/utimes.c
index 8e09dbdfd7f5..dad679d3a158 100644
--- a/fs/utimes.c
+++ b/fs/utimes.c
@@ -64,10 +64,6 @@ static int utimes_common(struct path *path, struct timespec *times)
newattrs.ia_valid = ATTR_CTIME | ATTR_MTIME | ATTR_ATIME;
if (times) {
- error = -EPERM;
- if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
- goto mnt_drop_write_and_out;
-
if (times[0].tv_nsec == UTIME_OMIT)
newattrs.ia_valid &= ~ATTR_ATIME;
else if (times[0].tv_nsec != UTIME_NOW) {