From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <1494478535.2028.9.camel@perches.com> Subject: Re: [PATCH] FS: Fixing return type of unsigned_offsets From: Joe Perches To: Pushkar Jambhlekar Cc: Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel Date: Wed, 10 May 2017 21:55:35 -0700 In-Reply-To: References: <1494476871-26474-1-git-send-email-pushkar.iit@gmail.com> <1494477592.2028.7.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: On Thu, 2017-05-11 at 10:13 +0530, Pushkar Jambhlekar wrote: > Should I change my implementation, i.e. remove '!!'? That'd be up to Al. At least one implementation using similar bit comparisons in fs/*.c does not use !! fs/locks.c:static bool lease_breaking(struct file_lock *fl) fs/locks.c-{ fs/locks.c-�����return fl->fl_flags & (FL_UNLOCK_PENDING | FL_DOWNGRADE_PENDING) fs/locks.c-} I didn't look very hard. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754536AbdEKEzl (ORCPT ); Thu, 11 May 2017 00:55:41 -0400 Received: from smtprelay0070.hostedemail.com ([216.40.44.70]:54951 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751028AbdEKEzk (ORCPT ); Thu, 11 May 2017 00:55:40 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::,RULES_HIT:41:355:379:421:541:599:968:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1538:1566:1593:1594:1711:1714:1730:1747:1777:1792:2393:2559:2562:2828:3138:3139:3140:3141:3142:3622:3867:3870:3874:4321:5007:7903:10004:10400:10848:11026:11232:11473:11658:11783:11914:12296:12438:12740:12895:13069:13311:13357:13439:13894:14659:14721:21080:21451:21627:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:4,LUA_SUMMARY:none X-HE-Tag: mice52_4e51b9265d737 X-Filterd-Recvd-Size: 1398 Message-ID: <1494478535.2028.9.camel@perches.com> Subject: Re: [PATCH] FS: Fixing return type of unsigned_offsets From: Joe Perches To: Pushkar Jambhlekar Cc: Al Viro , linux-fsdevel@vger.kernel.org, linux-kernel Date: Wed, 10 May 2017 21:55:35 -0700 In-Reply-To: References: <1494476871-26474-1-git-send-email-pushkar.iit@gmail.com> <1494477592.2028.7.camel@perches.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2017-05-11 at 10:13 +0530, Pushkar Jambhlekar wrote: > Should I change my implementation, i.e. remove '!!'? That'd be up to Al. At least one implementation using similar bit comparisons in fs/*.c does not use !! fs/locks.c:static bool lease_breaking(struct file_lock *fl) fs/locks.c-{ fs/locks.c-     return fl->fl_flags & (FL_UNLOCK_PENDING | FL_DOWNGRADE_PENDING) fs/locks.c-} I didn't look very hard.