From patchwork Thu Sep 13 20:38:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 1454221 Return-Path: X-Original-To: patchwork-cifs-client@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B7245DF24C for ; Thu, 13 Sep 2012 20:38:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756830Ab2IMUiW (ORCPT ); Thu, 13 Sep 2012 16:38:22 -0400 Received: from mail-vb0-f46.google.com ([209.85.212.46]:37912 "EHLO mail-vb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757742Ab2IMUiU (ORCPT ); Thu, 13 Sep 2012 16:38:20 -0400 Received: by mail-vb0-f46.google.com with SMTP id ff1so4013270vbb.19 for ; Thu, 13 Sep 2012 13:38:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=S/TqYKRqf/81b3Xqdwli5XFzMSh73T8AxNqfohemI6U=; b=bLIICNWHvL8vqoXyh6bl6DxpjzYjAzfON+D7/OEie/lizUWX9aLRvHbaSVEJbLVZia ErtXG6E9PS3lw0WtEd+9HXW2bynPL92S52FbrCgikZgIp+Gux5EEF+aRpohUs+2f0UyT e/dQ+7RaLO3VU/BJth1TXnUjJq4bZ65HBlZq76tiHS0WXBXejTbvJWDE+LDKyoIE5G/G piVwZDruFcHHA+ULonxj/KnZSSAgW2vWb/u/duWt1PQFUsgxaSJ2aH95vgnr9gHneJf8 9wo5In+sxfD2qPianF4Rwu3UhUo4sRhvjD0mZS3GfoY9YhqZiHwyMLhRj+A8Of1Uf0Cr lUpg== Received: by 10.58.80.66 with SMTP id p2mr331545vex.16.1347568699423; Thu, 13 Sep 2012 13:38:19 -0700 (PDT) Received: from salusa.poochiereds.net (cpe-069-134-145-027.nc.res.rr.com. [69.134.145.27]) by mx.google.com with ESMTPS id tb3sm12804932veb.12.2012.09.13.13.38.17 (version=SSLv3 cipher=OTHER); Thu, 13 Sep 2012 13:38:18 -0700 (PDT) From: Jeff Layton To: smfrench@gmail.com Cc: linux-cifs@vger.kernel.org, abokovoy@redhat.com Subject: [PATCH] cifs: add FL_CLOSE to fl_flags mask in cifs_read_flock Date: Thu, 13 Sep 2012 16:38:11 -0400 Message-Id: <1347568691-24628-1-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.7.11.4 X-Gm-Message-State: ALoCoQldQPbenx4SyVXvw1KB/IJ6HsDyexPhPsBpcLCdLQjwlVlKURqcYDI7PJNaRqNVzlhQ5dp5 Sender: linux-cifs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-cifs@vger.kernel.org FL_CLOSE is quite common when you close a file on which you hold a lock. The spurious "Unknown lock flags" message in cFYI is confusing in this case. Reported-by: Alexander Bokovoy Signed-off-by: Jeff Layton Reviewed-by: Pavel Shilovsky --- fs/cifs/file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 093f5a3..33158cd 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1173,7 +1173,8 @@ cifs_read_flock(struct file_lock *flock, __u32 *type, int *lock, int *unlock, if (flock->fl_flags & FL_LEASE) cFYI(1, "Lease on file - not implemented yet"); if (flock->fl_flags & - (~(FL_POSIX | FL_FLOCK | FL_SLEEP | FL_ACCESS | FL_LEASE))) + (~(FL_POSIX | FL_FLOCK | FL_SLEEP | + FL_ACCESS | FL_LEASE | FL_CLOSE))) cFYI(1, "Unknown lock flags 0x%x", flock->fl_flags); *type = server->vals->large_lock_type;