Whamcloud - gitweb
LU-17662 osd-zfs: Support for ZFS 2.2.3
[fs/lustre-release.git] / lustre / obdclass / obdo_server.c
index 0f7f474..0e546c4 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/obdclass/linux/linux-obdo.c
  *
@@ -94,6 +93,10 @@ void obdo_from_la(struct obdo *dst, const struct lu_attr *la, u64 valid)
                dst->o_flags = la->la_flags;
                newvalid |= OBD_MD_FLFLAGS;
        }
+       if (valid & LA_NLINK) {
+               dst->o_nlink = la->la_nlink;
+               newvalid |= OBD_MD_FLNLINK;
+       }
        dst->o_valid |= newvalid;
 }
 EXPORT_SYMBOL(obdo_from_la);
@@ -151,6 +154,10 @@ void la_from_obdo(struct lu_attr *dst, const struct obdo *obdo, u64 valid)
                dst->la_flags = obdo->o_flags;
                newvalid |= LA_FLAGS;
        }
+       if (valid & OBD_MD_FLNLINK) {
+               dst->la_nlink = obdo->o_nlink;
+               newvalid |= LA_NLINK;
+       }
        dst->la_valid = newvalid;
 }
 EXPORT_SYMBOL(la_from_obdo);