From patchwork Wed Mar 4 14:26:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Wagner X-Patchwork-Id: 5936591 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 100CF9F380 for ; Wed, 4 Mar 2015 14:26:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 577AB202B8 for ; Wed, 4 Mar 2015 14:26:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D117202AE for ; Wed, 4 Mar 2015 14:26:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756213AbbCDO0I (ORCPT ); Wed, 4 Mar 2015 09:26:08 -0500 Received: from mail.bmw-carit.de ([62.245.222.98]:53523 "EHLO linuxmail.bmw-carit.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755999AbbCDO0H (ORCPT ); Wed, 4 Mar 2015 09:26:07 -0500 Received: from localhost (handman.bmw-carit.intra [192.168.101.57]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: daniel.wagner) by linuxmail.bmw-carit.de (Postfix) with ESMTPSA id A194F4004F; Wed, 4 Mar 2015 13:21:34 +0100 (CET) From: Daniel Wagner To: Jeff Layton Cc: linux-fsdevel@vger.kernel.org, Daniel Wagner Subject: [PATCH] lease02: Do a lock-unlock sequence instead of lock-lock Date: Wed, 4 Mar 2015 15:26:03 +0100 Message-Id: <1425479163-2602-1-git-send-email-daniel.wagner@bmw-carit.de> X-Mailer: git-send-email 2.1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the copy&paste error. Signed-off-by: Daniel Wagner --- lease02.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lease02.c b/lease02.c index 6450e16..45433a4 100644 --- a/lease02.c +++ b/lease02.c @@ -64,7 +64,7 @@ leaseunlease(int nrlock, struct timespec *slot) perror("fcntl"); break; } - ret = fcntl(fd, F_SETLEASE, F_RDLCK); + ret = fcntl(fd, F_SETLEASE, F_UNLCK); if (ret < 0) { perror("fcntl"); break;