fs: return EPERM on immutable inode
authorEryu Guan <guaneryu@gmail.com>
Tue, 2 Aug 2016 11:58:28 +0000 (19:58 +0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 7 Aug 2016 14:03:31 +0000 (10:03 -0400)
commit337684a1746f93ae107e05d90977b070bb7e39d8
tree1922204c16c1b9a8a54cecb8d3512f2b46a2695b
parentfe64f3283fb315e3d8f2b78785a86904a852ca82
fs: return EPERM on immutable inode

In most cases, EPERM is returned on immutable inode, and there're only a
few places returning EACCES. I noticed this when running LTP on
overlayfs, setxattr03 failed due to unexpected EACCES on immutable
inode.

So converting all EACCES to EPERM on immutable inode.

Acked-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/gfs2/inode.c
fs/namei.c
fs/utimes.c
fs/xfs/xfs_ioctl.c