From 337684a1746f93ae107e05d90977b070bb7e39d8 Mon Sep 17 00:00:00 2001 From: Eryu Guan Date: Tue, 2 Aug 2016 19:58:28 +0800 Subject: 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 Signed-off-by: Eryu Guan Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- fs/xfs/xfs_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/xfs/xfs_ioctl.c') diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c index cf46658392ce..96a70fd1f5d6 100644 --- a/fs/xfs/xfs_ioctl.c +++ b/fs/xfs/xfs_ioctl.c @@ -232,7 +232,7 @@ xfs_open_by_handle( } if ((fmode & FMODE_WRITE) && IS_IMMUTABLE(inode)) { - error = -EACCES; + error = -EPERM; goto out_dput; } -- cgit v1.2.3