diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-08-09 02:03:00 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-12-16 12:16:44 -0500 |
commit | b0446be4be44768c7c7e919fadda98e1315fad09 (patch) | |
tree | b51d19d5a33774573f4edf0a1a3394726cf9b00f /fs/cachefiles | |
parent | 306bb73d12f13684ffcd735838c3e6f7515ab626 (diff) | |
download | op-kernel-dev-b0446be4be44768c7c7e919fadda98e1315fad09.zip op-kernel-dev-b0446be4be44768c7c7e919fadda98e1315fad09.tar.gz |
switch cachefiles to kern_path()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/cachefiles')
-rw-r--r-- | fs/cachefiles/bind.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/cachefiles/bind.c b/fs/cachefiles/bind.c index 3797e00..2906077 100644 --- a/fs/cachefiles/bind.c +++ b/fs/cachefiles/bind.c @@ -84,7 +84,7 @@ int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args) static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache) { struct cachefiles_object *fsdef; - struct nameidata nd; + struct path path; struct kstatfs stats; struct dentry *graveyard, *cachedir, *root; const struct cred *saved_cred; @@ -114,15 +114,12 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache) _debug("- fsdef %p", fsdef); /* look up the directory at the root of the cache */ - memset(&nd, 0, sizeof(nd)); - - ret = path_lookup(cache->rootdirname, LOOKUP_DIRECTORY, &nd); + ret = kern_path(cache->rootdirname, LOOKUP_DIRECTORY, &path); if (ret < 0) goto error_open_root; - cache->mnt = mntget(nd.path.mnt); - root = dget(nd.path.dentry); - path_put(&nd.path); + cache->mnt = path.mnt; + root = path.dentry; /* check parameters */ ret = -EOPNOTSUPP; |