mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
switch cachefiles to kern_path()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
306bb73d12
commit
b0446be4be
1 changed files with 4 additions and 7 deletions
|
@ -84,7 +84,7 @@ int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args)
|
||||||
static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
|
static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
|
||||||
{
|
{
|
||||||
struct cachefiles_object *fsdef;
|
struct cachefiles_object *fsdef;
|
||||||
struct nameidata nd;
|
struct path path;
|
||||||
struct kstatfs stats;
|
struct kstatfs stats;
|
||||||
struct dentry *graveyard, *cachedir, *root;
|
struct dentry *graveyard, *cachedir, *root;
|
||||||
const struct cred *saved_cred;
|
const struct cred *saved_cred;
|
||||||
|
@ -114,15 +114,12 @@ static int cachefiles_daemon_add_cache(struct cachefiles_cache *cache)
|
||||||
_debug("- fsdef %p", fsdef);
|
_debug("- fsdef %p", fsdef);
|
||||||
|
|
||||||
/* look up the directory at the root of the cache */
|
/* look up the directory at the root of the cache */
|
||||||
memset(&nd, 0, sizeof(nd));
|
ret = kern_path(cache->rootdirname, LOOKUP_DIRECTORY, &path);
|
||||||
|
|
||||||
ret = path_lookup(cache->rootdirname, LOOKUP_DIRECTORY, &nd);
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto error_open_root;
|
goto error_open_root;
|
||||||
|
|
||||||
cache->mnt = mntget(nd.path.mnt);
|
cache->mnt = path.mnt;
|
||||||
root = dget(nd.path.dentry);
|
root = path.dentry;
|
||||||
path_put(&nd.path);
|
|
||||||
|
|
||||||
/* check parameters */
|
/* check parameters */
|
||||||
ret = -EOPNOTSUPP;
|
ret = -EOPNOTSUPP;
|
||||||
|
|
Loading…
Reference in a new issue