aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/namespace.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index 19b98ca468eb..86b3169c8cac 100644
--- a/fs/nfs/namespace.c
+++ b/fs/nfs/namespace.c
@@ -51,7 +51,7 @@ char *nfs_path(const char *base, const struct dentry *dentry,
51 namelen = dentry->d_name.len; 51 namelen = dentry->d_name.len;
52 buflen -= namelen + 1; 52 buflen -= namelen + 1;
53 if (buflen < 0) 53 if (buflen < 0)
54 goto Elong; 54 goto Elong_unlock;
55 end -= namelen; 55 end -= namelen;
56 memcpy(end, dentry->d_name.name, namelen); 56 memcpy(end, dentry->d_name.name, namelen);
57 *--end = '/'; 57 *--end = '/';
@@ -68,6 +68,8 @@ char *nfs_path(const char *base, const struct dentry *dentry,
68 end -= namelen; 68 end -= namelen;
69 memcpy(end, base, namelen); 69 memcpy(end, base, namelen);
70 return end; 70 return end;
71Elong_unlock:
72 spin_unlock(&dcache_lock);
71Elong: 73Elong:
72 return ERR_PTR(-ENAMETOOLONG); 74 return ERR_PTR(-ENAMETOOLONG);
73} 75}