Whamcloud - gitweb
LU-1337 llite: kernel 3.1 changes open_to_namei_flags
[fs/lustre-release.git] / lustre / llite / llite_close.c
index d2a6b0b..8136658 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +26,8 @@
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2011, 2012, Whamcloud, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -42,7 +42,6 @@
 
 #define DEBUG_SUBSYSTEM S_LLITE
 
-//#include <lustre_mdc.h>
 #include <lustre_lite.h>
 #include "llite_internal.h"
 
@@ -96,10 +95,10 @@ void ll_queue_done_writing(struct inode *inode, unsigned long flags)
                 struct ll_close_queue *lcq = ll_i2sbi(inode)->ll_lcq;
 
                 if (lli->lli_flags & LLIF_MDS_SIZE_LOCK)
-                         CWARN("ino %lu/%u(flags %lu) som valid it just after "
-                               "recovery\n",
-                               inode->i_ino, inode->i_generation,
-                               lli->lli_flags);
+                        CWARN("ino %lu/%u(flags %u) som valid it just after "
+                              "recovery\n",
+                              inode->i_ino, inode->i_generation,
+                              lli->lli_flags);
                 /* DONE_WRITING is allowed and inode has no dirty page. */
                 cfs_spin_lock(&lcq->lcq_lock);
 
@@ -132,7 +131,7 @@ void ll_done_writing_attr(struct inode *inode, struct md_op_data *op_data)
         op_data->op_flags |= MF_SOM_CHANGE;
         /* Check if Size-on-MDS attributes are valid. */
         if (lli->lli_flags & LLIF_MDS_SIZE_LOCK)
-                CERROR("ino %lu/%u(flags %lu) som valid it just after "
+                CERROR("ino %lu/%u(flags %u) som valid it just after "
                        "recovery\n", inode->i_ino, inode->i_generation,
                        lli->lli_flags);
 
@@ -230,7 +229,7 @@ int ll_som_update(struct inode *inode, struct md_op_data *op_data)
 
         LASSERT(op_data != NULL);
         if (lli->lli_flags & LLIF_MDS_SIZE_LOCK)
-                CERROR("ino %lu/%u(flags %lu) som valid it just after "
+                CERROR("ino %lu/%u(flags %u) som valid it just after "
                        "recovery\n", inode->i_ino, inode->i_generation,
                        lli->lli_flags);
 
@@ -249,10 +248,7 @@ int ll_som_update(struct inode *inode, struct md_op_data *op_data)
                                       old_flags & MF_GETATTR_LOCK);
                 if (rc) {
                         oa->o_valid = 0;
-                        if (rc == -ENOENT)
-                                CDEBUG(D_INODE, "objid "LPX64" is destroyed\n",
-                                       lli->lli_smd->lsm_object_id);
-                        else
+                       if (rc != -ENOENT)
                                 CERROR("inode_getattr failed (%d): unable to "
                                        "send a Size-on-MDS attribute update "
                                        "for inode %lu/%u\n", rc, inode->i_ino,