diff options
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/dir.c | 9 | ||||
-rw-r--r-- | fs/nfs/inode.c | 11 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 8 | ||||
-rw-r--r-- | fs/nfs/super.c | 4 |
4 files changed, 19 insertions, 13 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 187caa47dad9..e79bc6ce828e 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -1139,14 +1139,13 @@ out_zap_parent: | |||
1139 | if (inode && S_ISDIR(inode->i_mode)) { | 1139 | if (inode && S_ISDIR(inode->i_mode)) { |
1140 | /* Purge readdir caches. */ | 1140 | /* Purge readdir caches. */ |
1141 | nfs_zap_caches(inode); | 1141 | nfs_zap_caches(inode); |
1142 | /* If we have submounts, don't unhash ! */ | ||
1143 | if (have_submounts(dentry)) | ||
1144 | goto out_valid; | ||
1145 | if (dentry->d_flags & DCACHE_DISCONNECTED) | 1142 | if (dentry->d_flags & DCACHE_DISCONNECTED) |
1146 | goto out_valid; | 1143 | goto out_valid; |
1147 | shrink_dcache_parent(dentry); | ||
1148 | } | 1144 | } |
1149 | d_drop(dentry); | 1145 | /* If we have submounts, don't unhash ! */ |
1146 | if (check_submounts_and_drop(dentry) != 0) | ||
1147 | goto out_valid; | ||
1148 | |||
1150 | dput(parent); | 1149 | dput(parent); |
1151 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", | 1150 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", |
1152 | __func__, dentry->d_parent->d_name.name, | 1151 | __func__, dentry->d_parent->d_name.name, |
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 4bcb00ae30ae..87e797640828 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -464,7 +464,6 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr, st | |||
464 | unlock_new_inode(inode); | 464 | unlock_new_inode(inode); |
465 | } else | 465 | } else |
466 | nfs_refresh_inode(inode, fattr); | 466 | nfs_refresh_inode(inode, fattr); |
467 | nfs_setsecurity(inode, fattr, label); | ||
468 | dprintk("NFS: nfs_fhget(%s/%Ld fh_crc=0x%08x ct=%d)\n", | 467 | dprintk("NFS: nfs_fhget(%s/%Ld fh_crc=0x%08x ct=%d)\n", |
469 | inode->i_sb->s_id, | 468 | inode->i_sb->s_id, |
470 | (long long)NFS_FILEID(inode), | 469 | (long long)NFS_FILEID(inode), |
@@ -972,9 +971,15 @@ EXPORT_SYMBOL_GPL(nfs_revalidate_inode); | |||
972 | static int nfs_invalidate_mapping(struct inode *inode, struct address_space *mapping) | 971 | static int nfs_invalidate_mapping(struct inode *inode, struct address_space *mapping) |
973 | { | 972 | { |
974 | struct nfs_inode *nfsi = NFS_I(inode); | 973 | struct nfs_inode *nfsi = NFS_I(inode); |
975 | 974 | int ret; | |
975 | |||
976 | if (mapping->nrpages != 0) { | 976 | if (mapping->nrpages != 0) { |
977 | int ret = invalidate_inode_pages2(mapping); | 977 | if (S_ISREG(inode->i_mode)) { |
978 | ret = nfs_sync_mapping(mapping); | ||
979 | if (ret < 0) | ||
980 | return ret; | ||
981 | } | ||
982 | ret = invalidate_inode_pages2(mapping); | ||
978 | if (ret < 0) | 983 | if (ret < 0) |
979 | return ret; | 984 | return ret; |
980 | } | 985 | } |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 4b6a2f05b335..989bb9d3074d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3196,15 +3196,13 @@ struct rpc_clnt * | |||
3196 | nfs4_proc_lookup_mountpoint(struct inode *dir, struct qstr *name, | 3196 | nfs4_proc_lookup_mountpoint(struct inode *dir, struct qstr *name, |
3197 | struct nfs_fh *fhandle, struct nfs_fattr *fattr) | 3197 | struct nfs_fh *fhandle, struct nfs_fattr *fattr) |
3198 | { | 3198 | { |
3199 | struct rpc_clnt *client = NFS_CLIENT(dir); | ||
3199 | int status; | 3200 | int status; |
3200 | struct rpc_clnt *client = rpc_clone_client(NFS_CLIENT(dir)); | ||
3201 | 3201 | ||
3202 | status = nfs4_proc_lookup_common(&client, dir, name, fhandle, fattr, NULL); | 3202 | status = nfs4_proc_lookup_common(&client, dir, name, fhandle, fattr, NULL); |
3203 | if (status < 0) { | 3203 | if (status < 0) |
3204 | rpc_shutdown_client(client); | ||
3205 | return ERR_PTR(status); | 3204 | return ERR_PTR(status); |
3206 | } | 3205 | return (client == NFS_CLIENT(dir)) ? rpc_clone_client(client) : client; |
3207 | return client; | ||
3208 | } | 3206 | } |
3209 | 3207 | ||
3210 | static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry) | 3208 | static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry) |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 50bc31d8e7f0..5793f24613c8 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2509,6 +2509,10 @@ struct dentry *nfs_fs_mount_common(struct nfs_server *server, | |||
2509 | if (server->flags & NFS_MOUNT_NOAC) | 2509 | if (server->flags & NFS_MOUNT_NOAC) |
2510 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | 2510 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; |
2511 | 2511 | ||
2512 | if (mount_info->cloned != NULL && mount_info->cloned->sb != NULL) | ||
2513 | if (mount_info->cloned->sb->s_flags & MS_SYNCHRONOUS) | ||
2514 | sb_mntdata.mntflags |= MS_SYNCHRONOUS; | ||
2515 | |||
2512 | /* Get a superblock - note that we may end up sharing one that already exists */ | 2516 | /* Get a superblock - note that we may end up sharing one that already exists */ |
2513 | s = sget(nfs_mod->nfs_fs, compare_super, nfs_set_super, flags, &sb_mntdata); | 2517 | s = sget(nfs_mod->nfs_fs, compare_super, nfs_set_super, flags, &sb_mntdata); |
2514 | if (IS_ERR(s)) { | 2518 | if (IS_ERR(s)) { |