diff options
Diffstat (limited to 'fs/hostfs')
-rw-r--r-- | fs/hostfs/hostfs_kern.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 0bc81cf256b8..d3244d949a4e 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c | |||
@@ -749,11 +749,14 @@ int hostfs_rename(struct inode *from_ino, struct dentry *from, | |||
749 | return err; | 749 | return err; |
750 | } | 750 | } |
751 | 751 | ||
752 | int hostfs_permission(struct inode *ino, int desired) | 752 | int hostfs_permission(struct inode *ino, int desired, unsigned int flags) |
753 | { | 753 | { |
754 | char *name; | 754 | char *name; |
755 | int r = 0, w = 0, x = 0, err; | 755 | int r = 0, w = 0, x = 0, err; |
756 | 756 | ||
757 | if (flags & IPERM_FLAG_RCU) | ||
758 | return -ECHILD; | ||
759 | |||
757 | if (desired & MAY_READ) r = 1; | 760 | if (desired & MAY_READ) r = 1; |
758 | if (desired & MAY_WRITE) w = 1; | 761 | if (desired & MAY_WRITE) w = 1; |
759 | if (desired & MAY_EXEC) x = 1; | 762 | if (desired & MAY_EXEC) x = 1; |
@@ -768,7 +771,7 @@ int hostfs_permission(struct inode *ino, int desired) | |||
768 | err = access_file(name, r, w, x); | 771 | err = access_file(name, r, w, x); |
769 | __putname(name); | 772 | __putname(name); |
770 | if (!err) | 773 | if (!err) |
771 | err = generic_permission(ino, desired, NULL); | 774 | err = generic_permission(ino, desired, flags, NULL); |
772 | return err; | 775 | return err; |
773 | } | 776 | } |
774 | 777 | ||