diff options
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r-- | fs/nfs/dir.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 5ae8ee6b298f..60da7550133c 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -777,7 +777,6 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd) | |||
777 | struct nfs_fattr fattr; | 777 | struct nfs_fattr fattr; |
778 | 778 | ||
779 | parent = dget_parent(dentry); | 779 | parent = dget_parent(dentry); |
780 | lock_kernel(); | ||
781 | dir = parent->d_inode; | 780 | dir = parent->d_inode; |
782 | nfs_inc_stats(dir, NFSIOS_DENTRYREVALIDATE); | 781 | nfs_inc_stats(dir, NFSIOS_DENTRYREVALIDATE); |
783 | inode = dentry->d_inode; | 782 | inode = dentry->d_inode; |
@@ -815,7 +814,6 @@ static int nfs_lookup_revalidate(struct dentry * dentry, struct nameidata *nd) | |||
815 | 814 | ||
816 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 815 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
817 | out_valid: | 816 | out_valid: |
818 | unlock_kernel(); | ||
819 | dput(parent); | 817 | dput(parent); |
820 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is valid\n", | 818 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is valid\n", |
821 | __func__, dentry->d_parent->d_name.name, | 819 | __func__, dentry->d_parent->d_name.name, |
@@ -834,7 +832,6 @@ out_zap_parent: | |||
834 | shrink_dcache_parent(dentry); | 832 | shrink_dcache_parent(dentry); |
835 | } | 833 | } |
836 | d_drop(dentry); | 834 | d_drop(dentry); |
837 | unlock_kernel(); | ||
838 | dput(parent); | 835 | dput(parent); |
839 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", | 836 | dfprintk(LOOKUPCACHE, "NFS: %s(%s/%s) is invalid\n", |
840 | __func__, dentry->d_parent->d_name.name, | 837 | __func__, dentry->d_parent->d_name.name, |
@@ -921,8 +918,6 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru | |||
921 | res = ERR_PTR(-ENOMEM); | 918 | res = ERR_PTR(-ENOMEM); |
922 | dentry->d_op = NFS_PROTO(dir)->dentry_ops; | 919 | dentry->d_op = NFS_PROTO(dir)->dentry_ops; |
923 | 920 | ||
924 | lock_kernel(); | ||
925 | |||
926 | /* | 921 | /* |
927 | * If we're doing an exclusive create, optimize away the lookup | 922 | * If we're doing an exclusive create, optimize away the lookup |
928 | * but don't hash the dentry. | 923 | * but don't hash the dentry. |
@@ -930,7 +925,7 @@ static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, stru | |||
930 | if (nfs_is_exclusive_create(dir, nd)) { | 925 | if (nfs_is_exclusive_create(dir, nd)) { |
931 | d_instantiate(dentry, NULL); | 926 | d_instantiate(dentry, NULL); |
932 | res = NULL; | 927 | res = NULL; |
933 | goto out_unlock; | 928 | goto out; |
934 | } | 929 | } |
935 | 930 | ||
936 | parent = dentry->d_parent; | 931 | parent = dentry->d_parent; |
@@ -958,8 +953,6 @@ no_entry: | |||
958 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); | 953 | nfs_set_verifier(dentry, nfs_save_change_attribute(dir)); |
959 | out_unblock_sillyrename: | 954 | out_unblock_sillyrename: |
960 | nfs_unblock_sillyrename(parent); | 955 | nfs_unblock_sillyrename(parent); |
961 | out_unlock: | ||
962 | unlock_kernel(); | ||
963 | out: | 956 | out: |
964 | return res; | 957 | return res; |
965 | } | 958 | } |