[RFC 24/26] union-mount: dont report EROFS for union mounts

From: Jan Blunck
Date: Mon Jul 30 2007 - 12:20:19 EST


SuS v2 requires we report a read only fs too. For union-mounts this is a very
expensive check. So I'm lazy and just disable the check if we are on a lower
layer of an union.

Signed-off-by: Jan Blunck <jblunck@xxxxxxx>
---
fs/open.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/fs/open.c
+++ b/fs/open.c
@@ -483,7 +483,7 @@ asmlinkage long sys_faccessat(int dfd, c
special_file(nd.dentry->d_inode->i_mode))
goto out_path_release;

- if(IS_RDONLY(nd.dentry->d_inode))
+ if (!(nd.um_flags & LAST_LOWLEVEL) && IS_RDONLY(nd.dentry->d_inode))
res = -EROFS;

out_path_release:

--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/