fs: take dcache_lock inside __d_path

All callers take dcache_lock just around the call to __d_path, so
take the lock into it in preparation of getting rid of dcache_lock.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Christoph Hellwig
2010-10-10 05:36:21 -04:00
committed by Al Viro
parent 85fe4025c6
commit be148247cf
4 changed files with 4 additions and 8 deletions

View File

@@ -72,10 +72,8 @@ static int d_namespace_path(struct path *path, char *buf, int buflen,
path_get(&root);
}
spin_lock(&dcache_lock);
tmp = root;
res = __d_path(path, &tmp, buf, buflen);
spin_unlock(&dcache_lock);
*name = res;
/* handle error conditions - and still allow a partial path to