Whamcloud - gitweb
LU-10046 misc: replace LASSERT() with CLASSERT()
[fs/lustre-release.git] / lustre / obdclass / obdo.c
index 478081f..322b2f5 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -47,7 +43,6 @@
 # include <linux/uidgid.h>
 #endif
 #include <obd_class.h>
-#include <lustre/lustre_idl.h>
 #include <lustre_obdo.h>
 
 void obdo_set_parent_fid(struct obdo *dst, const struct lu_fid *parent)
@@ -59,6 +54,13 @@ void obdo_set_parent_fid(struct obdo *dst, const struct lu_fid *parent)
 }
 EXPORT_SYMBOL(obdo_set_parent_fid);
 
+void obdo_set_o_projid(struct obdo *dst, u32 projid)
+{
+       dst->o_projid = projid;
+       dst->o_valid |= OBD_MD_FLPROJID;
+}
+EXPORT_SYMBOL(obdo_set_o_projid);
+
 /* WARNING: the file systems must take care not to tinker with
    attributes they don't manage (such as blocks). */
 void obdo_from_inode(struct obdo *dst, struct inode *src, u64 valid)
@@ -179,7 +181,6 @@ void lustre_set_wire_obdo(const struct obd_connect_data *ocd,
                                 const struct obdo *lobdo)
 {
        *wobdo = *lobdo;
-       wobdo->o_flags &= ~OBD_FL_LOCAL_MASK;
        if (ocd == NULL)
                return;
 
@@ -200,17 +201,7 @@ void lustre_get_wire_obdo(const struct obd_connect_data *ocd,
                                 struct obdo *lobdo,
                                 const struct obdo *wobdo)
 {
-       __u32 local_flags = 0;
-
-       if (lobdo->o_valid & OBD_MD_FLFLAGS)
-               local_flags = lobdo->o_flags & OBD_FL_LOCAL_MASK;
-
        *lobdo = *wobdo;
-       if (local_flags != 0) {
-               lobdo->o_valid |= OBD_MD_FLFLAGS;
-               lobdo->o_flags &= ~OBD_FL_LOCAL_MASK;
-               lobdo->o_flags |= local_flags;
-       }
        if (ocd == NULL)
                return;