From 116b6e93e60ee068114df6e5d3aff7d81c4765a7 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 9 Aug 2009 02:03:00 +0400 Subject: [PATCH] --- yaml --- r: 177396 b: refs/heads/master c: b0446be4be44768c7c7e919fadda98e1315fad09 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/cachefiles/bind.c | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index 14cc7e9ea080..3e3ae6b162cc 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 306bb73d12f13684ffcd735838c3e6f7515ab626 +refs/heads/master: b0446be4be44768c7c7e919fadda98e1315fad09 diff --git a/trunk/fs/cachefiles/bind.c b/trunk/fs/cachefiles/bind.c index 3797e0077b35..2906077ac798 100644 --- a/trunk/fs/cachefiles/bind.c +++ b/trunk/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;