aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/dir.c2
-rw-r--r--fs/nfs/inode.c6
-rw-r--r--fs/nfs/write.c2
-rw-r--r--include/linux/nfs_fs.h1
-rw-r--r--net/sunrpc/xprtrdma/transport.c6
5 files changed, 13 insertions, 4 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index ae04892a5e5d..6cea7479c5b4 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -710,6 +710,8 @@ int nfs_lookup_verify_inode(struct inode *inode, struct nameidata *nd)
710{ 710{
711 struct nfs_server *server = NFS_SERVER(inode); 711 struct nfs_server *server = NFS_SERVER(inode);
712 712
713 if (test_bit(NFS_INO_MOUNTPOINT, &NFS_I(inode)->flags))
714 return 0;
713 if (nd != NULL) { 715 if (nd != NULL) {
714 /* VFS wants an on-the-wire revalidation */ 716 /* VFS wants an on-the-wire revalidation */
715 if (nd->flags & LOOKUP_REVAL) 717 if (nd->flags & LOOKUP_REVAL)
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 966a8850aa30..a4c7cf2bff3a 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -299,6 +299,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr)
299 else 299 else
300 inode->i_op = &nfs_mountpoint_inode_operations; 300 inode->i_op = &nfs_mountpoint_inode_operations;
301 inode->i_fop = NULL; 301 inode->i_fop = NULL;
302 set_bit(NFS_INO_MOUNTPOINT, &nfsi->flags);
302 } 303 }
303 } else if (S_ISLNK(inode->i_mode)) 304 } else if (S_ISLNK(inode->i_mode))
304 inode->i_op = &nfs_symlink_inode_operations; 305 inode->i_op = &nfs_symlink_inode_operations;
@@ -1003,8 +1004,9 @@ static int nfs_update_inode(struct inode *inode, struct nfs_fattr *fattr)
1003 1004
1004 server = NFS_SERVER(inode); 1005 server = NFS_SERVER(inode);
1005 /* Update the fsid? */ 1006 /* Update the fsid? */
1006 if (S_ISDIR(inode->i_mode) 1007 if (S_ISDIR(inode->i_mode) &&
1007 && !nfs_fsid_equal(&server->fsid, &fattr->fsid)) 1008 !nfs_fsid_equal(&server->fsid, &fattr->fsid) &&
1009 !test_bit(NFS_INO_MOUNTPOINT, &nfsi->flags))
1008 server->fsid = fattr->fsid; 1010 server->fsid = fattr->fsid;
1009 1011
1010 /* 1012 /*
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index f55c437124a2..80c61fdb2720 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -734,7 +734,7 @@ int nfs_updatepage(struct file *file, struct page *page,
734 */ 734 */
735 if (nfs_write_pageuptodate(page, inode) && 735 if (nfs_write_pageuptodate(page, inode) &&
736 inode->i_flock == NULL && 736 inode->i_flock == NULL &&
737 !(file->f_mode & O_SYNC)) { 737 !(file->f_flags & O_SYNC)) {
738 count = max(count + offset, nfs_page_length(page)); 738 count = max(count + offset, nfs_page_length(page));
739 offset = 0; 739 offset = 0;
740 } 740 }
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index a69ba80f2dfe..f4a0e4c218df 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -195,6 +195,7 @@ struct nfs_inode {
195#define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */ 195#define NFS_INO_ADVISE_RDPLUS (1) /* advise readdirplus */
196#define NFS_INO_STALE (2) /* possible stale inode */ 196#define NFS_INO_STALE (2) /* possible stale inode */
197#define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */ 197#define NFS_INO_ACL_LRU_SET (3) /* Inode is on the LRU list */
198#define NFS_INO_MOUNTPOINT (4) /* inode is remote mountpoint */
198 199
199static inline struct nfs_inode *NFS_I(const struct inode *inode) 200static inline struct nfs_inode *NFS_I(const struct inode *inode)
200{ 201{
diff --git a/net/sunrpc/xprtrdma/transport.c b/net/sunrpc/xprtrdma/transport.c
index 02c522c17de5..a564c1a39ec5 100644
--- a/net/sunrpc/xprtrdma/transport.c
+++ b/net/sunrpc/xprtrdma/transport.c
@@ -614,7 +614,11 @@ xprt_rdma_free(void *buffer)
614 return; 614 return;
615 615
616 req = container_of(buffer, struct rpcrdma_req, rl_xdr_buf[0]); 616 req = container_of(buffer, struct rpcrdma_req, rl_xdr_buf[0]);
617 r_xprt = container_of(req->rl_buffer, struct rpcrdma_xprt, rx_buf); 617 if (req->rl_iov.length == 0) { /* see allocate above */
618 r_xprt = container_of(((struct rpcrdma_req *) req->rl_buffer)->rl_buffer,
619 struct rpcrdma_xprt, rx_buf);
620 } else
621 r_xprt = container_of(req->rl_buffer, struct rpcrdma_xprt, rx_buf);
618 rep = req->rl_reply; 622 rep = req->rl_reply;
619 623
620 dprintk("RPC: %s: called on 0x%p%s\n", 624 dprintk("RPC: %s: called on 0x%p%s\n",