File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args)
8484static 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 ;
You can’t perform that action at this time.
0 commit comments