aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-12-07 18:16:57 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-01-06 23:16:53 -0500
commitd8c9584ea2a92879f471fd3a2be3af6c534fb035 (patch)
tree3541b9c6228f820bdc65e4875156eb27b1c91cb1 /fs/autofs4
parentece2ccb668046610189d88d6aaf05aeb09c988a1 (diff)
vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/autofs4')
-rw-r--r--fs/autofs4/dev-ioctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c
index 509fe1eb66ae..76741d8d7786 100644
--- a/fs/autofs4/dev-ioctl.c
+++ b/fs/autofs4/dev-ioctl.c
@@ -194,7 +194,7 @@ static int find_autofs_mount(const char *pathname,
194 return err; 194 return err;
195 err = -ENOENT; 195 err = -ENOENT;
196 while (path.dentry == path.mnt->mnt_root) { 196 while (path.dentry == path.mnt->mnt_root) {
197 if (path.mnt->mnt_sb->s_magic == AUTOFS_SUPER_MAGIC) { 197 if (path.dentry->d_sb->s_magic == AUTOFS_SUPER_MAGIC) {
198 if (test(&path, data)) { 198 if (test(&path, data)) {
199 path_get(&path); 199 path_get(&path);
200 if (!err) /* already found some */ 200 if (!err) /* already found some */
@@ -212,7 +212,7 @@ static int find_autofs_mount(const char *pathname,
212 212
213static int test_by_dev(struct path *path, void *p) 213static int test_by_dev(struct path *path, void *p)
214{ 214{
215 return path->mnt->mnt_sb->s_dev == *(dev_t *)p; 215 return path->dentry->d_sb->s_dev == *(dev_t *)p;
216} 216}
217 217
218static int test_by_type(struct path *path, void *p) 218static int test_by_type(struct path *path, void *p)
@@ -538,11 +538,11 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
538 err = find_autofs_mount(name, &path, test_by_type, &type); 538 err = find_autofs_mount(name, &path, test_by_type, &type);
539 if (err) 539 if (err)
540 goto out; 540 goto out;
541 devid = new_encode_dev(path.mnt->mnt_sb->s_dev); 541 devid = new_encode_dev(path.dentry->d_sb->s_dev);
542 err = 0; 542 err = 0;
543 if (path.mnt->mnt_root == path.dentry) { 543 if (path.mnt->mnt_root == path.dentry) {
544 err = 1; 544 err = 1;
545 magic = path.mnt->mnt_sb->s_magic; 545 magic = path.dentry->d_sb->s_magic;
546 } 546 }
547 } else { 547 } else {
548 dev_t dev = sbi->sb->s_dev; 548 dev_t dev = sbi->sb->s_dev;
@@ -556,7 +556,7 @@ static int autofs_dev_ioctl_ismountpoint(struct file *fp,
556 err = have_submounts(path.dentry); 556 err = have_submounts(path.dentry);
557 557
558 if (follow_down_one(&path)) 558 if (follow_down_one(&path))
559 magic = path.mnt->mnt_sb->s_magic; 559 magic = path.dentry->d_sb->s_magic;
560 } 560 }
561 561
562 param->ismountpoint.out.devid = devid; 562 param->ismountpoint.out.devid = devid;