aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/nfs4xdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfsd/nfs4xdr.c')
-rw-r--r--fs/nfsd/nfs4xdr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c
index a45032ce7b80..158badf945df 100644
--- a/fs/nfsd/nfs4xdr.c
+++ b/fs/nfsd/nfs4xdr.c
@@ -2292,7 +2292,7 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
2292#ifdef CONFIG_NFSD_V4_SECURITY_LABEL 2292#ifdef CONFIG_NFSD_V4_SECURITY_LABEL
2293 if ((bmval[2] & FATTR4_WORD2_SECURITY_LABEL) || 2293 if ((bmval[2] & FATTR4_WORD2_SECURITY_LABEL) ||
2294 bmval[0] & FATTR4_WORD0_SUPPORTED_ATTRS) { 2294 bmval[0] & FATTR4_WORD0_SUPPORTED_ATTRS) {
2295 err = security_inode_getsecctx(dentry->d_inode, 2295 err = security_inode_getsecctx(d_inode(dentry),
2296 &context, &contextlen); 2296 &context, &contextlen);
2297 contextsupport = (err == 0); 2297 contextsupport = (err == 0);
2298 if (bmval2 & FATTR4_WORD2_SECURITY_LABEL) { 2298 if (bmval2 & FATTR4_WORD2_SECURITY_LABEL) {
@@ -2384,7 +2384,7 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp,
2384 p = xdr_reserve_space(xdr, 8); 2384 p = xdr_reserve_space(xdr, 8);
2385 if (!p) 2385 if (!p)
2386 goto out_resource; 2386 goto out_resource;
2387 p = encode_change(p, &stat, dentry->d_inode); 2387 p = encode_change(p, &stat, d_inode(dentry));
2388 } 2388 }
2389 if (bmval0 & FATTR4_WORD0_SIZE) { 2389 if (bmval0 & FATTR4_WORD0_SIZE) {
2390 p = xdr_reserve_space(xdr, 8); 2390 p = xdr_reserve_space(xdr, 8);
@@ -2807,7 +2807,7 @@ nfsd4_encode_dirent_fattr(struct xdr_stream *xdr, struct nfsd4_readdir *cd,
2807 dentry = lookup_one_len(name, cd->rd_fhp->fh_dentry, namlen); 2807 dentry = lookup_one_len(name, cd->rd_fhp->fh_dentry, namlen);
2808 if (IS_ERR(dentry)) 2808 if (IS_ERR(dentry))
2809 return nfserrno(PTR_ERR(dentry)); 2809 return nfserrno(PTR_ERR(dentry));
2810 if (!dentry->d_inode) { 2810 if (d_really_is_negative(dentry)) {
2811 /* 2811 /*
2812 * nfsd_buffered_readdir drops the i_mutex between 2812 * nfsd_buffered_readdir drops the i_mutex between
2813 * readdir and calling this callback, leaving a window 2813 * readdir and calling this callback, leaving a window
@@ -3324,7 +3324,7 @@ static __be32 nfsd4_encode_splice_read(
3324 } 3324 }
3325 3325
3326 eof = (read->rd_offset + maxcount >= 3326 eof = (read->rd_offset + maxcount >=
3327 read->rd_fhp->fh_dentry->d_inode->i_size); 3327 d_inode(read->rd_fhp->fh_dentry)->i_size);
3328 3328
3329 *(p++) = htonl(eof); 3329 *(p++) = htonl(eof);
3330 *(p++) = htonl(maxcount); 3330 *(p++) = htonl(maxcount);
@@ -3401,7 +3401,7 @@ static __be32 nfsd4_encode_readv(struct nfsd4_compoundres *resp,
3401 xdr_truncate_encode(xdr, starting_len + 8 + ((maxcount+3)&~3)); 3401 xdr_truncate_encode(xdr, starting_len + 8 + ((maxcount+3)&~3));
3402 3402
3403 eof = (read->rd_offset + maxcount >= 3403 eof = (read->rd_offset + maxcount >=
3404 read->rd_fhp->fh_dentry->d_inode->i_size); 3404 d_inode(read->rd_fhp->fh_dentry)->i_size);
3405 3405
3406 tmp = htonl(eof); 3406 tmp = htonl(eof);
3407 write_bytes_to_xdr_buf(xdr->buf, starting_len , &tmp, 4); 3407 write_bytes_to_xdr_buf(xdr->buf, starting_len , &tmp, 4);