Whamcloud - gitweb
LU-8658 ptlrpc: Suppress error for flock requests
[fs/lustre-release.git] / lustre / ptlrpc / client.c
index 59f4cc5..f340fc2 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
  */
@@ -220,7 +216,7 @@ void __ptlrpc_prep_bulk_page(struct ptlrpc_bulk_desc *desc,
        desc->bd_nob += len;
 
        if (pin)
-               page_cache_get(page);
+               get_page(page);
 
        kiov->kiov_page = page;
        kiov->kiov_offset = pageoffset;
@@ -1258,7 +1254,9 @@ static int ptlrpc_check_status(struct ptlrpc_request *req)
                lnet_nid_t nid = imp->imp_connection->c_peer.nid;
                __u32 opc = lustre_msg_get_opc(req->rq_reqmsg);
 
-               if (ptlrpc_console_allow(req))
+               /* -EAGAIN is normal when using POSIX flocks */
+               if (ptlrpc_console_allow(req) &&
+                   !(opc == LDLM_ENQUEUE && err == -EAGAIN))
                        LCONSOLE_ERROR_MSG(0x11, "%s: operation %s to node %s "
                                           "failed: rc = %d\n",
                                           imp->imp_obd->obd_name,