Whamcloud - gitweb
LU-9934 build: address issues raised by gcc7
[fs/lustre-release.git] / lustre / ofd / ofd_obd.c
index cc04521..dba54a4 100644 (file)
@@ -23,7 +23,7 @@
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2016, Intel Corporation.
+ * Copyright (c) 2012, 2017, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
 
 #define DEBUG_SUBSYSTEM S_FILTER
 
-#include <lustre/lustre_idl.h>
 #include "ofd_internal.h"
 #include <obd_cksum.h>
-#include <uapi/linux/lustre_ioctl.h>
+#include <uapi/linux/lustre/lustre_ioctl.h>
 #include <lustre_quota.h>
 #include <lustre_lfsck.h>
 #include <lustre_nodemap.h>
@@ -715,7 +714,7 @@ static int ofd_get_info(const struct lu_env *env, struct obd_export *exp,
  * \retval             negative value on error
  */
 int ofd_statfs(const struct lu_env *env,  struct obd_export *exp,
-              struct obd_statfs *osfs, __u64 max_age, __u32 flags)
+              struct obd_statfs *osfs, time64_t max_age, __u32 flags)
 {
         struct obd_device      *obd = class_exp2obd(exp);
        struct ofd_device       *ofd = ofd_exp(exp);
@@ -818,7 +817,6 @@ static int ofd_echo_setattr(const struct lu_env *env, struct obd_export *exp,
        struct ldlm_resource    *res;
        struct ofd_object       *fo;
        struct lu_fid           *fid = &oa->o_oi.oi_fid;
-       struct filter_fid       *ff = NULL;
        int                      rc = 0;
 
        ENTRY;
@@ -855,13 +853,8 @@ static int ofd_echo_setattr(const struct lu_env *env, struct obd_export *exp,
        la_from_obdo(&info->fti_attr, oa, oa->o_valid);
        info->fti_attr.la_valid &= ~LA_TYPE;
 
-       if (oa->o_valid & OBD_MD_FLFID) {
-               ff = &info->fti_mds_fid;
-               ofd_prepare_fidea(ff, oa);
-       }
-
        /* setting objects attributes (including owner/group) */
-       rc = ofd_attr_set(env, fo, &info->fti_attr, ff);
+       rc = ofd_attr_set(env, fo, &info->fti_attr, oa);
        if (rc)
                GOTO(out_unlock, rc);
 
@@ -1170,7 +1163,7 @@ static int ofd_ioc_get_obj_version(const struct lu_env *env,
                   data->ioc_inllen3 == sizeof(__u64) &&
                   data->ioc_inlbuf4 != NULL &&
                   data->ioc_inllen4 == sizeof(__u64)) {
-               struct ost_id ostid;
+               struct ost_id ostid = { };
 
                ostid_set_seq(&ostid, *(__u64 *)data->ioc_inlbuf4);
                rc = ostid_set_id(&ostid, *(__u64 *)data->ioc_inlbuf3);