aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/dir.c13
-rw-r--r--fs/nfs/sysctl.c5
2 files changed, 12 insertions, 6 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 4133ef5264e5..b34cd16f472f 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -935,8 +935,17 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru
935 935
936no_entry: 936no_entry:
937 res = d_materialise_unique(dentry, inode); 937 res = d_materialise_unique(dentry, inode);
938 if (res != NULL) 938 if (res != NULL) {
939 struct dentry *parent;
940 if (IS_ERR(res))
941 goto out_unlock;
942 /* Was a directory renamed! */
943 parent = dget_parent(res);
944 if (!IS_ROOT(parent))
945 nfs_mark_for_revalidate(parent->d_inode);
946 dput(parent);
939 dentry = res; 947 dentry = res;
948 }
940 nfs_renew_times(dentry); 949 nfs_renew_times(dentry);
941 nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); 950 nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
942out_unlock: 951out_unlock:
@@ -1132,6 +1141,8 @@ static struct dentry *nfs_readdir_lookup(nfs_readdir_descriptor_t *desc)
1132 alias = d_materialise_unique(dentry, inode); 1141 alias = d_materialise_unique(dentry, inode);
1133 if (alias != NULL) { 1142 if (alias != NULL) {
1134 dput(dentry); 1143 dput(dentry);
1144 if (IS_ERR(alias))
1145 return NULL;
1135 dentry = alias; 1146 dentry = alias;
1136 } 1147 }
1137 1148
diff --git a/fs/nfs/sysctl.c b/fs/nfs/sysctl.c
index 2fe3403c2409..3ea50ac64820 100644
--- a/fs/nfs/sysctl.c
+++ b/fs/nfs/sysctl.c
@@ -18,11 +18,6 @@
18static const int nfs_set_port_min = 0; 18static const int nfs_set_port_min = 0;
19static const int nfs_set_port_max = 65535; 19static const int nfs_set_port_max = 65535;
20static struct ctl_table_header *nfs_callback_sysctl_table; 20static struct ctl_table_header *nfs_callback_sysctl_table;
21/*
22 * Something that isn't CTL_ANY, CTL_NONE or a value that may clash.
23 * Use the same values as fs/lockd/svc.c
24 */
25#define CTL_UNNUMBERED -2
26 21
27static ctl_table nfs_cb_sysctls[] = { 22static ctl_table nfs_cb_sysctls[] = {
28#ifdef CONFIG_NFS_V4 23#ifdef CONFIG_NFS_V4