aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-04-02 21:17:03 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-05-09 10:49:42 -0400
commite24977d45f45d1675e050dc1a0aaf4bfc4ca9866 (patch)
treeee39b590596e9ca6cd18b8ece11a1f6d24278c29 /fs
parent6b3304b531704711286c3359b06922b83fdba015 (diff)
Reduce path_lookup() abuses
... use kern_path() where possible [folded a fix from rdd] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/gfs2/ops_fstype.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 650a730707b7..1ff9473ea753 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -1282,21 +1282,21 @@ static int gfs2_get_sb(struct file_system_type *fs_type, int flags,
1282static struct super_block *get_gfs2_sb(const char *dev_name) 1282static struct super_block *get_gfs2_sb(const char *dev_name)
1283{ 1283{
1284 struct super_block *sb; 1284 struct super_block *sb;
1285 struct nameidata nd; 1285 struct path path;
1286 int error; 1286 int error;
1287 1287
1288 error = path_lookup(dev_name, LOOKUP_FOLLOW, &nd); 1288 error = kern_path(dev_name, LOOKUP_FOLLOW, &path);
1289 if (error) { 1289 if (error) {
1290 printk(KERN_WARNING "GFS2: path_lookup on %s returned error %d\n", 1290 printk(KERN_WARNING "GFS2: path_lookup on %s returned error %d\n",
1291 dev_name, error); 1291 dev_name, error);
1292 return NULL; 1292 return NULL;
1293 } 1293 }
1294 sb = nd.path.dentry->d_inode->i_sb; 1294 sb = path.dentry->d_inode->i_sb;
1295 if (sb && (sb->s_type == &gfs2_fs_type)) 1295 if (sb && (sb->s_type == &gfs2_fs_type))
1296 atomic_inc(&sb->s_active); 1296 atomic_inc(&sb->s_active);
1297 else 1297 else
1298 sb = NULL; 1298 sb = NULL;
1299 path_put(&nd.path); 1299 path_put(&path);
1300 return sb; 1300 return sb;
1301} 1301}
1302 1302