aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2014-10-20 22:22:38 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2014-11-03 15:21:14 -0500
commit7c2f909400a4b1067df11a038b11f8a75a64365d (patch)
tree2e83d5d6046f9826f74227f9e5168606823ffb4a
parentd6689e5ffebdc8360b9c2e7c33a1acb4aff3850f (diff)
kill ll_mkdir_generic()
fold into ll_mkdir() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--drivers/staging/lustre/lustre/llite/namei.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c
index f5d4475b1df2..aa76d52fb92b 100644
--- a/drivers/staging/lustre/lustre/llite/namei.c
+++ b/drivers/staging/lustre/lustre/llite/namei.c
@@ -927,26 +927,6 @@ out:
927 return err; 927 return err;
928} 928}
929 929
930static int ll_mkdir_generic(struct inode *dir, struct qstr *name,
931 int mode, struct dentry *dchild)
932
933{
934 int err;
935
936 CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
937 name->len, name->name, dir->i_ino, dir->i_generation, dir);
938
939 if (!IS_POSIXACL(dir) || !exp_connect_umask(ll_i2mdexp(dir)))
940 mode &= ~current_umask();
941 mode = (mode & (S_IRWXUGO|S_ISVTX)) | S_IFDIR;
942 err = ll_new_node(dir, name, NULL, mode, 0, dchild, LUSTRE_OPC_MKDIR);
943
944 if (!err)
945 ll_stats_ops_tally(ll_i2sbi(dir), LPROC_LL_MKDIR, 1);
946
947 return err;
948}
949
950/* Try to find the child dentry by its name. 930/* Try to find the child dentry by its name.
951 If found, put the result fid into @fid. */ 931 If found, put the result fid into @fid. */
952static void ll_get_child_fid(struct inode * dir, struct qstr *name, 932static void ll_get_child_fid(struct inode * dir, struct qstr *name,
@@ -1191,7 +1171,20 @@ static int ll_unlink(struct inode * dir, struct dentry *dentry)
1191 1171
1192static int ll_mkdir(struct inode *dir, struct dentry *dentry, ll_umode_t mode) 1172static int ll_mkdir(struct inode *dir, struct dentry *dentry, ll_umode_t mode)
1193{ 1173{
1194 return ll_mkdir_generic(dir, &dentry->d_name, mode, dentry); 1174 int err;
1175
1176 CDEBUG(D_VFSTRACE, "VFS Op:name=%pd,dir=%lu/%u(%p)\n",
1177 dentry, dir->i_ino, dir->i_generation, dir);
1178
1179 if (!IS_POSIXACL(dir) || !exp_connect_umask(ll_i2mdexp(dir)))
1180 mode &= ~current_umask();
1181 mode = (mode & (S_IRWXUGO|S_ISVTX)) | S_IFDIR;
1182 err = ll_new_node(dir, &dentry->d_name, NULL, mode, 0, dentry, LUSTRE_OPC_MKDIR);
1183
1184 if (!err)
1185 ll_stats_ops_tally(ll_i2sbi(dir), LPROC_LL_MKDIR, 1);
1186
1187 return err;
1195} 1188}
1196 1189
1197static int ll_rmdir(struct inode *dir, struct dentry *dentry) 1190static int ll_rmdir(struct inode *dir, struct dentry *dentry)