Skip to content

Commit

Permalink
switch cachefiles to kern_path()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Dec 16, 2009
1 parent 306bb73 commit b0446be
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions fs/cachefiles/bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b0446be

Please sign in to comment.