diff options
Diffstat (limited to 'fs/fuse/dir.c')
-rw-r--r-- | fs/fuse/dir.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 0df56b6c26e2..e2b14001cea5 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -971,9 +971,9 @@ static int fuse_access(struct inode *inode, int mask) | |||
971 | return err; | 971 | return err; |
972 | } | 972 | } |
973 | 973 | ||
974 | static int fuse_perm_getattr(struct inode *inode, int flags) | 974 | static int fuse_perm_getattr(struct inode *inode, int mask) |
975 | { | 975 | { |
976 | if (flags & IPERM_FLAG_RCU) | 976 | if (mask & MAY_NOT_BLOCK) |
977 | return -ECHILD; | 977 | return -ECHILD; |
978 | 978 | ||
979 | return fuse_do_getattr(inode, NULL, NULL); | 979 | return fuse_do_getattr(inode, NULL, NULL); |
@@ -992,7 +992,7 @@ static int fuse_perm_getattr(struct inode *inode, int flags) | |||
992 | * access request is sent. Execute permission is still checked | 992 | * access request is sent. Execute permission is still checked |
993 | * locally based on file mode. | 993 | * locally based on file mode. |
994 | */ | 994 | */ |
995 | static int fuse_permission(struct inode *inode, int mask, unsigned int flags) | 995 | static int fuse_permission(struct inode *inode, int mask) |
996 | { | 996 | { |
997 | struct fuse_conn *fc = get_fuse_conn(inode); | 997 | struct fuse_conn *fc = get_fuse_conn(inode); |
998 | bool refreshed = false; | 998 | bool refreshed = false; |
@@ -1011,7 +1011,7 @@ static int fuse_permission(struct inode *inode, int mask, unsigned int flags) | |||
1011 | if (fi->i_time < get_jiffies_64()) { | 1011 | if (fi->i_time < get_jiffies_64()) { |
1012 | refreshed = true; | 1012 | refreshed = true; |
1013 | 1013 | ||
1014 | err = fuse_perm_getattr(inode, flags); | 1014 | err = fuse_perm_getattr(inode, mask); |
1015 | if (err) | 1015 | if (err) |
1016 | return err; | 1016 | return err; |
1017 | } | 1017 | } |
@@ -1024,7 +1024,7 @@ static int fuse_permission(struct inode *inode, int mask, unsigned int flags) | |||
1024 | attributes. This is also needed, because the root | 1024 | attributes. This is also needed, because the root |
1025 | node will at first have no permissions */ | 1025 | node will at first have no permissions */ |
1026 | if (err == -EACCES && !refreshed) { | 1026 | if (err == -EACCES && !refreshed) { |
1027 | err = fuse_perm_getattr(inode, flags); | 1027 | err = fuse_perm_getattr(inode, mask); |
1028 | if (!err) | 1028 | if (!err) |
1029 | err = generic_permission(inode, mask); | 1029 | err = generic_permission(inode, mask); |
1030 | } | 1030 | } |
@@ -1034,7 +1034,7 @@ static int fuse_permission(struct inode *inode, int mask, unsigned int flags) | |||
1034 | noticed immediately, only after the attribute | 1034 | noticed immediately, only after the attribute |
1035 | timeout has expired */ | 1035 | timeout has expired */ |
1036 | } else if (mask & (MAY_ACCESS | MAY_CHDIR)) { | 1036 | } else if (mask & (MAY_ACCESS | MAY_CHDIR)) { |
1037 | if (flags & IPERM_FLAG_RCU) | 1037 | if (mask & MAY_NOT_BLOCK) |
1038 | return -ECHILD; | 1038 | return -ECHILD; |
1039 | 1039 | ||
1040 | err = fuse_access(inode, mask); | 1040 | err = fuse_access(inode, mask); |
@@ -1043,7 +1043,7 @@ static int fuse_permission(struct inode *inode, int mask, unsigned int flags) | |||
1043 | if (refreshed) | 1043 | if (refreshed) |
1044 | return -EACCES; | 1044 | return -EACCES; |
1045 | 1045 | ||
1046 | err = fuse_perm_getattr(inode, flags); | 1046 | err = fuse_perm_getattr(inode, mask); |
1047 | if (!err && !(inode->i_mode & S_IXUGO)) | 1047 | if (!err && !(inode->i_mode & S_IXUGO)) |
1048 | return -EACCES; | 1048 | return -EACCES; |
1049 | } | 1049 | } |