]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - fs/namei.c
bna: Delete get_flags and set_flags ethtool methods.
[net-next-2.6.git] / fs / namei.c
index 13ff4abdbdcad8e3a67c63a932f476e612bcc762..17ea76bf2fbee41e9ff8a20616e0523781ed2315 100644 (file)
@@ -483,13 +483,8 @@ ok:
 
 static __always_inline void set_root(struct nameidata *nd)
 {
-       if (!nd->root.mnt) {
-               struct fs_struct *fs = current->fs;
-               read_lock(&fs->lock);
-               nd->root = fs->root;
-               path_get(&nd->root);
-               read_unlock(&fs->lock);
-       }
+       if (!nd->root.mnt)
+               get_fs_root(current->fs, &nd->root);
 }
 
 static int link_path_walk(const char *, struct nameidata *);
@@ -1015,11 +1010,7 @@ static int path_init(int dfd, const char *name, unsigned int flags, struct namei
                nd->path = nd->root;
                path_get(&nd->root);
        } else if (dfd == AT_FDCWD) {
-               struct fs_struct *fs = current->fs;
-               read_lock(&fs->lock);
-               nd->path = fs->pwd;
-               path_get(&fs->pwd);
-               read_unlock(&fs->lock);
+               get_fs_pwd(current->fs, &nd->path);
        } else {
                struct dentry *dentry;