Whamcloud - gitweb
LU-8906 mdd: Return rc in mdd_local_file_create() 41/24141/2
authorHenri Doreau <henri.doreau@cea.fr>
Mon, 5 Dec 2016 14:43:03 +0000 (15:43 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 17 Dec 2016 05:49:04 +0000 (05:49 +0000)
rc was sometimes set but not returned, with no reason.

Change-Id: I30d1aa94aedce1dd974ff0da20b1491298d2d70e
Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Reviewed-on: https://review.whamcloud.com/24141
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/mdd/mdd_device.c

index 5dcb5f1..54f11e0 100644 (file)
@@ -955,7 +955,7 @@ int mdd_local_file_create(const struct lu_env *env, struct mdd_device *mdd,
                          __u32 mode, struct lu_fid *fid)
 {
        struct dt_object *parent, *dto;
-       int rc;
+       int rc = 0;
 
        ENTRY;
 
@@ -981,7 +981,7 @@ int mdd_local_file_create(const struct lu_env *env, struct mdd_device *mdd,
        EXIT;
 out_put:
        lu_object_put(env, &parent->do_lu);
-       return 0;
+       return rc;
 }
 
 static int mdd_lfsck_out_notify(const struct lu_env *env, void *data,