Whamcloud - gitweb
LU-2804 mdd: move ACL mode handling to MDD
[fs/lustre-release.git] / lustre / mdd / mdd_internal.h
index 97f6cb6..d72737d 100644 (file)
@@ -240,10 +240,10 @@ int mdd_attr_get(const struct lu_env *env, struct md_object *obj,
 int mdd_attr_set(const struct lu_env *env, struct md_object *obj,
                 const struct md_attr *ma);
 int mdd_attr_set_internal(const struct lu_env *env,
-                          struct mdd_object *obj,
-                          struct lu_attr *attr,
-                          struct thandle *handle,
-                          int needacl);
+                         struct mdd_object *obj,
+                         const struct lu_attr *attr,
+                         struct thandle *handle,
+                         int needacl);
 int mdd_attr_check_set_internal(const struct lu_env *env,
                                 struct mdd_object *obj,
                                 struct lu_attr *attr,
@@ -304,7 +304,7 @@ int mdd_finish_unlink(const struct lu_env *env, struct mdd_object *obj,
                       struct md_attr *ma, struct thandle *th);
 int mdd_object_initialize(const struct lu_env *env, const struct lu_fid *pfid,
                          const struct lu_name *lname, struct mdd_object *child,
-                         struct lu_attr *attr, struct thandle *handle,
+                         const struct lu_attr *attr, struct thandle *handle,
                          const struct md_op_spec *spec);
 int mdd_link_sanity_check(const struct lu_env *env, struct mdd_object *tgt_obj,
                           const struct lu_name *lname, struct mdd_object *src_obj);
@@ -469,8 +469,8 @@ int __mdd_declare_acl_init(const struct lu_env *env, struct mdd_object *obj,
                            int is_dir, struct thandle *handle);
 int mdd_acl_set(const struct lu_env *env, struct mdd_object *obj,
                const struct lu_buf *buf, int fl);
-int __mdd_acl_init(const struct lu_env *env, struct mdd_object *obj,
-                   struct lu_buf *buf, __u32 *mode, struct thandle *handle);
+int __mdd_fix_mode_acl(const struct lu_env *env, struct lu_buf *buf,
+                      __u32 *mode);
 int __mdd_permission_internal(const struct lu_env *env, struct mdd_object *obj,
                               struct lu_attr *la, int mask, int role);
 int mdd_permission(const struct lu_env *env,
@@ -865,23 +865,10 @@ int mdo_create_obj(const struct lu_env *env, struct mdd_object *o,
                    struct thandle *handle)
 {
         struct dt_object *next = mdd_object_child(o);
-       struct lu_ucred *uc = lu_ucred(env);
-       __u32 saved;
        int rc;
 
-       /*
-        *  LU-974 enforce client umask in creation.
-        * TODO: CMD needs to handle this for remote object.
-        */
-       if (likely(uc != NULL))
-               saved = xchg(&current->fs->umask, uc->uc_umask & S_IRWXUGO);
-
        rc = next->do_ops->do_create(env, next, attr, hint, dof, handle);
 
-       /* restore previous umask value */
-       if (likely(uc != NULL))
-               current->fs->umask = saved;
-
        return rc;
 }