diff options
Diffstat (limited to 'fs/nfsd')
-rw-r--r-- | fs/nfsd/nfsfh.c | 2 | ||||
-rw-r--r-- | fs/nfsd/vfs.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c index f45451eb1e38..ea37c96f0445 100644 --- a/fs/nfsd/nfsfh.c +++ b/fs/nfsd/nfsfh.c | |||
@@ -51,7 +51,7 @@ static int nfsd_acceptable(void *expv, struct dentry *dentry) | |||
51 | /* make sure parents give x permission to user */ | 51 | /* make sure parents give x permission to user */ |
52 | int err; | 52 | int err; |
53 | parent = dget_parent(tdentry); | 53 | parent = dget_parent(tdentry); |
54 | err = permission(parent->d_inode, MAY_EXEC, NULL); | 54 | err = inode_permission(parent->d_inode, MAY_EXEC); |
55 | if (err < 0) { | 55 | if (err < 0) { |
56 | dput(parent); | 56 | dput(parent); |
57 | break; | 57 | break; |
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index ad1ad59e3742..18060bed5267 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
@@ -1953,12 +1953,12 @@ nfsd_permission(struct svc_rqst *rqstp, struct svc_export *exp, | |||
1953 | return 0; | 1953 | return 0; |
1954 | 1954 | ||
1955 | /* This assumes NFSD_MAY_{READ,WRITE,EXEC} == MAY_{READ,WRITE,EXEC} */ | 1955 | /* This assumes NFSD_MAY_{READ,WRITE,EXEC} == MAY_{READ,WRITE,EXEC} */ |
1956 | err = permission(inode, acc & (MAY_READ|MAY_WRITE|MAY_EXEC), NULL); | 1956 | err = inode_permission(inode, acc & (MAY_READ|MAY_WRITE|MAY_EXEC)); |
1957 | 1957 | ||
1958 | /* Allow read access to binaries even when mode 111 */ | 1958 | /* Allow read access to binaries even when mode 111 */ |
1959 | if (err == -EACCES && S_ISREG(inode->i_mode) && | 1959 | if (err == -EACCES && S_ISREG(inode->i_mode) && |
1960 | acc == (NFSD_MAY_READ | NFSD_MAY_OWNER_OVERRIDE)) | 1960 | acc == (NFSD_MAY_READ | NFSD_MAY_OWNER_OVERRIDE)) |
1961 | err = permission(inode, MAY_EXEC, NULL); | 1961 | err = inode_permission(inode, MAY_EXEC); |
1962 | 1962 | ||
1963 | return err? nfserrno(err) : 0; | 1963 | return err? nfserrno(err) : 0; |
1964 | } | 1964 | } |