Skip to content

Commit b0446be

Browse files
author
Al Viro
committed
switch cachefiles to kern_path()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 306bb73 commit b0446be

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

fs/cachefiles/bind.c

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args)
8484
static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
8585
{
8686
struct cachefiles_object *fsdef;
87-
struct nameidata nd;
87+
struct path path;
8888
struct kstatfs stats;
8989
struct dentry *graveyard, *cachedir, *root;
9090
const struct cred *saved_cred;
@@ -114,15 +114,12 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
114114
_debug("- fsdef %p", fsdef);
115115

116116
/* look up the directory at the root of the cache */
117-
memset(&nd, 0, sizeof(nd));
118-
119-
ret = path_lookup(cache->rootdirname, LOOKUP_DIRECTORY, &nd);
117+
ret = kern_path(cache->rootdirname, LOOKUP_DIRECTORY, &path);
120118
if (ret < 0)
121119
goto error_open_root;
122120

123-
cache->mnt = mntget(nd.path.mnt);
124-
root = dget(nd.path.dentry);
125-
path_put(&nd.path);
121+
cache->mnt = path.mnt;
122+
root = path.dentry;
126123

127124
/* check parameters */
128125
ret = -EOPNOTSUPP;

0 commit comments

Comments
 (0)