diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-16 17:20:23 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-18 01:21:27 -0500 |
commit | 09f12c03fa699ce7d030c47add60577138927d4f (patch) | |
tree | b9ef52e197a38579799ba9b62f78bf0c35efa4cc /fs/autofs4/root.c | |
parent | 14a2f00bde7668fe18d1c8355d26c7c96961e1f7 (diff) |
autofs4: pass mode to autofs4_get_inode() explicitly
In all cases we'd set inf->mode to know value just before
passing it to autofs4_get_inode(). That kills the need
to store it in autofs_info and pass it to autofs_init_ino()
Acked-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/autofs4/root.c')
-rw-r--r-- | fs/autofs4/root.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index f47aceabf58f..e55dcdbeb450 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c | |||
@@ -508,7 +508,7 @@ static struct dentry *autofs4_lookup(struct inode *dir, struct dentry *dentry, s | |||
508 | if (autofs_type_indirect(sbi->type) && IS_ROOT(dentry->d_parent)) | 508 | if (autofs_type_indirect(sbi->type) && IS_ROOT(dentry->d_parent)) |
509 | __managed_dentry_set_managed(dentry); | 509 | __managed_dentry_set_managed(dentry); |
510 | 510 | ||
511 | ino = autofs4_init_ino(NULL, sbi, 0555); | 511 | ino = autofs4_init_ino(NULL, sbi); |
512 | if (!ino) | 512 | if (!ino) |
513 | return ERR_PTR(-ENOMEM); | 513 | return ERR_PTR(-ENOMEM); |
514 | 514 | ||
@@ -538,7 +538,7 @@ static int autofs4_dir_symlink(struct inode *dir, | |||
538 | if (!autofs4_oz_mode(sbi)) | 538 | if (!autofs4_oz_mode(sbi)) |
539 | return -EACCES; | 539 | return -EACCES; |
540 | 540 | ||
541 | ino = autofs4_init_ino(ino, sbi, S_IFLNK | 0555); | 541 | ino = autofs4_init_ino(ino, sbi); |
542 | if (!ino) | 542 | if (!ino) |
543 | return -ENOMEM; | 543 | return -ENOMEM; |
544 | 544 | ||
@@ -554,7 +554,7 @@ static int autofs4_dir_symlink(struct inode *dir, | |||
554 | 554 | ||
555 | strcpy(cp, symname); | 555 | strcpy(cp, symname); |
556 | 556 | ||
557 | inode = autofs4_get_inode(dir->i_sb, ino); | 557 | inode = autofs4_get_inode(dir->i_sb, ino, S_IFLNK | 0555); |
558 | if (!inode) { | 558 | if (!inode) { |
559 | kfree(cp); | 559 | kfree(cp); |
560 | if (!dentry->d_fsdata) | 560 | if (!dentry->d_fsdata) |
@@ -733,13 +733,13 @@ static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, int mode) | |||
733 | DPRINTK("dentry %p, creating %.*s", | 733 | DPRINTK("dentry %p, creating %.*s", |
734 | dentry, dentry->d_name.len, dentry->d_name.name); | 734 | dentry, dentry->d_name.len, dentry->d_name.name); |
735 | 735 | ||
736 | ino = autofs4_init_ino(ino, sbi, S_IFDIR | 0555); | 736 | ino = autofs4_init_ino(ino, sbi); |
737 | if (!ino) | 737 | if (!ino) |
738 | return -ENOMEM; | 738 | return -ENOMEM; |
739 | 739 | ||
740 | autofs4_del_active(dentry); | 740 | autofs4_del_active(dentry); |
741 | 741 | ||
742 | inode = autofs4_get_inode(dir->i_sb, ino); | 742 | inode = autofs4_get_inode(dir->i_sb, ino, S_IFDIR | 0555); |
743 | if (!inode) { | 743 | if (!inode) { |
744 | if (!dentry->d_fsdata) | 744 | if (!dentry->d_fsdata) |
745 | kfree(ino); | 745 | kfree(ino); |