aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd')
-rw-r--r--fs/nfsd/nfs4recover.c4
-rw-r--r--fs/nfsd/nfsfh.c8
-rw-r--r--fs/nfsd/vfs.c8
3 files changed, 10 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c
index cc6a76072009..1c307f02baa8 100644
--- a/fs/nfsd/nfs4recover.c
+++ b/fs/nfsd/nfs4recover.c
@@ -583,7 +583,7 @@ nfs4_reset_recoverydir(char *recdir)
583 if (status) 583 if (status)
584 return status; 584 return status;
585 status = -ENOTDIR; 585 status = -ENOTDIR;
586 if (S_ISDIR(path.dentry->d_inode->i_mode)) { 586 if (d_is_dir(path.dentry)) {
587 strcpy(user_recovery_dirname, recdir); 587 strcpy(user_recovery_dirname, recdir);
588 status = 0; 588 status = 0;
589 } 589 }
@@ -1426,7 +1426,7 @@ nfsd4_client_tracking_init(struct net *net)
1426 nn->client_tracking_ops = &nfsd4_legacy_tracking_ops; 1426 nn->client_tracking_ops = &nfsd4_legacy_tracking_ops;
1427 status = kern_path(nfs4_recoverydir(), LOOKUP_FOLLOW, &path); 1427 status = kern_path(nfs4_recoverydir(), LOOKUP_FOLLOW, &path);
1428 if (!status) { 1428 if (!status) {
1429 status = S_ISDIR(path.dentry->d_inode->i_mode); 1429 status = d_is_dir(path.dentry);
1430 path_put(&path); 1430 path_put(&path);
1431 if (status) 1431 if (status)
1432 goto do_init; 1432 goto do_init;
diff --git a/fs/nfsd/nfsfh.c b/fs/nfsd/nfsfh.c
index 965b478d50fc..e9fa966fc37f 100644
--- a/fs/nfsd/nfsfh.c
+++ b/fs/nfsd/nfsfh.c
@@ -114,8 +114,8 @@ static inline __be32 check_pseudo_root(struct svc_rqst *rqstp,
114 * We're exposing only the directories and symlinks that have to be 114 * We're exposing only the directories and symlinks that have to be
115 * traversed on the way to real exports: 115 * traversed on the way to real exports:
116 */ 116 */
117 if (unlikely(!S_ISDIR(dentry->d_inode->i_mode) && 117 if (unlikely(!d_is_dir(dentry) &&
118 !S_ISLNK(dentry->d_inode->i_mode))) 118 !d_is_symlink(dentry)))
119 return nfserr_stale; 119 return nfserr_stale;
120 /* 120 /*
121 * A pseudoroot export gives permission to access only one 121 * A pseudoroot export gives permission to access only one
@@ -259,7 +259,7 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp)
259 goto out; 259 goto out;
260 } 260 }
261 261
262 if (S_ISDIR(dentry->d_inode->i_mode) && 262 if (d_is_dir(dentry) &&
263 (dentry->d_flags & DCACHE_DISCONNECTED)) { 263 (dentry->d_flags & DCACHE_DISCONNECTED)) {
264 printk("nfsd: find_fh_dentry returned a DISCONNECTED directory: %pd2\n", 264 printk("nfsd: find_fh_dentry returned a DISCONNECTED directory: %pd2\n",
265 dentry); 265 dentry);
@@ -414,7 +414,7 @@ static inline void _fh_update_old(struct dentry *dentry,
414{ 414{
415 fh->ofh_ino = ino_t_to_u32(dentry->d_inode->i_ino); 415 fh->ofh_ino = ino_t_to_u32(dentry->d_inode->i_ino);
416 fh->ofh_generation = dentry->d_inode->i_generation; 416 fh->ofh_generation = dentry->d_inode->i_generation;
417 if (S_ISDIR(dentry->d_inode->i_mode) || 417 if (d_is_dir(dentry) ||
418 (exp->ex_flags & NFSEXP_NOSUBTREECHECK)) 418 (exp->ex_flags & NFSEXP_NOSUBTREECHECK))
419 fh->ofh_dirino = 0; 419 fh->ofh_dirino = 0;
420} 420}
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index 5685c679dd93..368526582429 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -615,9 +615,9 @@ nfsd_access(struct svc_rqst *rqstp, struct svc_fh *fhp, u32 *access, u32 *suppor
615 export = fhp->fh_export; 615 export = fhp->fh_export;
616 dentry = fhp->fh_dentry; 616 dentry = fhp->fh_dentry;
617 617
618 if (S_ISREG(dentry->d_inode->i_mode)) 618 if (d_is_reg(dentry))
619 map = nfs3_regaccess; 619 map = nfs3_regaccess;
620 else if (S_ISDIR(dentry->d_inode->i_mode)) 620 else if (d_is_dir(dentry))
621 map = nfs3_diraccess; 621 map = nfs3_diraccess;
622 else 622 else
623 map = nfs3_anyaccess; 623 map = nfs3_anyaccess;
@@ -1402,7 +1402,7 @@ do_nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
1402 1402
1403 switch (createmode) { 1403 switch (createmode) {
1404 case NFS3_CREATE_UNCHECKED: 1404 case NFS3_CREATE_UNCHECKED:
1405 if (! S_ISREG(dchild->d_inode->i_mode)) 1405 if (! d_is_reg(dchild))
1406 goto out; 1406 goto out;
1407 else if (truncp) { 1407 else if (truncp) {
1408 /* in nfsv4, we need to treat this case a little 1408 /* in nfsv4, we need to treat this case a little
@@ -1615,7 +1615,7 @@ nfsd_link(struct svc_rqst *rqstp, struct svc_fh *ffhp,
1615 if (err) 1615 if (err)
1616 goto out; 1616 goto out;
1617 err = nfserr_isdir; 1617 err = nfserr_isdir;
1618 if (S_ISDIR(tfhp->fh_dentry->d_inode->i_mode)) 1618 if (d_is_dir(tfhp->fh_dentry))
1619 goto out; 1619 goto out;
1620 err = nfserr_perm; 1620 err = nfserr_perm;
1621 if (!len) 1621 if (!len)