summaryrefslogtreecommitdiffstats
path: root/fs/autofs4/root.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2011-01-16 17:20:23 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-01-18 01:21:27 -0500
commit09f12c03fa699ce7d030c47add60577138927d4f (patch)
treeb9ef52e197a38579799ba9b62f78bf0c35efa4cc /fs/autofs4/root.c
parent14a2f00bde7668fe18d1c8355d26c7c96961e1f7 (diff)
downloadop-kernel-dev-09f12c03fa699ce7d030c47add60577138927d4f.zip
op-kernel-dev-09f12c03fa699ce7d030c47add60577138927d4f.tar.gz
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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index f47acea..e55dcdb 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
if (autofs_type_indirect(sbi->type) && IS_ROOT(dentry->d_parent))
__managed_dentry_set_managed(dentry);
- ino = autofs4_init_ino(NULL, sbi, 0555);
+ ino = autofs4_init_ino(NULL, sbi);
if (!ino)
return ERR_PTR(-ENOMEM);
@@ -538,7 +538,7 @@ static int autofs4_dir_symlink(struct inode *dir,
if (!autofs4_oz_mode(sbi))
return -EACCES;
- ino = autofs4_init_ino(ino, sbi, S_IFLNK | 0555);
+ ino = autofs4_init_ino(ino, sbi);
if (!ino)
return -ENOMEM;
@@ -554,7 +554,7 @@ static int autofs4_dir_symlink(struct inode *dir,
strcpy(cp, symname);
- inode = autofs4_get_inode(dir->i_sb, ino);
+ inode = autofs4_get_inode(dir->i_sb, ino, S_IFLNK | 0555);
if (!inode) {
kfree(cp);
if (!dentry->d_fsdata)
@@ -733,13 +733,13 @@ static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, int mode)
DPRINTK("dentry %p, creating %.*s",
dentry, dentry->d_name.len, dentry->d_name.name);
- ino = autofs4_init_ino(ino, sbi, S_IFDIR | 0555);
+ ino = autofs4_init_ino(ino, sbi);
if (!ino)
return -ENOMEM;
autofs4_del_active(dentry);
- inode = autofs4_get_inode(dir->i_sb, ino);
+ inode = autofs4_get_inode(dir->i_sb, ino, S_IFDIR | 0555);
if (!inode) {
if (!dentry->d_fsdata)
kfree(ino);
OpenPOWER on IntegriCloud