Whamcloud - gitweb
LU-8900 snapshot: simulate readonly device
[fs/lustre-release.git] / lustre / mdd / mdd_permission.c
index 00f14bc..282d530 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
  */
@@ -27,7 +23,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2015, Intel Corporation.
+ * Copyright (c) 2012, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -99,9 +95,10 @@ int mdd_acl_set(const struct lu_env *env, struct mdd_object *obj,
        struct thandle          *handle;
        posix_acl_xattr_header  *head;
        posix_acl_xattr_entry   *entry;
-       int                      rc, entry_count;
+       int                      entry_count;
        bool                     not_equiv, mode_change;
        mode_t                   mode;
+       int                      rc;
        ENTRY;
 
        head = (posix_acl_xattr_header *)(buf->lb_buf);
@@ -163,7 +160,7 @@ int mdd_acl_set(const struct lu_env *env, struct mdd_object *obj,
 unlock:
        mdd_write_unlock(env, obj);
 stop:
-       mdd_trans_stop(env, mdd, rc, handle);
+       rc = mdd_trans_stop(env, mdd, rc, handle);
 
        RETURN(rc);
 }