mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Signed-off-by: Eryu Guan <[email protected]> Signed-off-by: Al Viro <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
fe64f3283f
commit
337684a174
4 changed files with 5 additions and 4 deletions
|
|
@ -1800,7 +1800,7 @@ int gfs2_permission(struct inode *inode, int mask)
|
|||
}
|
||||
|
||||
if ((mask & MAY_WRITE) && IS_IMMUTABLE(inode))
|
||||
error = -EACCES;
|
||||
error = -EPERM;
|
||||
else
|
||||
error = generic_permission(inode, mask);
|
||||
if (gfs2_holder_initialized(&i_gh))
|
||||
|
|
|
|||
Loading…
Reference in a new issue