mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
[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 <[email protected]> CC: Michael Kerrisk <[email protected]> Signed-off-by: Miklos Szeredi <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
b1da47e29e
commit
beb29e058c
3 changed files with 7 additions and 26 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue