Re: [PATCH 01/39] ocfs2: POSIX file locks support

From: Mark Fasheh
Date: Tue Oct 07 2008 - 16:09:42 EST


On Wed, Oct 01, 2008 at 11:11:44PM -0700, Andrew Morton wrote:
> > On Wed, 24 Sep 2008 15:00:42 -0700 Mark Fasheh <mfasheh@xxxxxxxx> wrote:
> > +int ocfs2_stack_supports_plocks(void)
> > +{
> > + return !!(active_stack && active_stack->sp_ops->plock);
> > +}
>
> It's pointless doing !! on something which is already 0 or 1.

Sure - the following patch is now on the 'merge_window' branch of ocfs2.git.

Also, thanks for all the review you did on these.
--Mark

--
Mark Fasheh

From: Mark Fasheh <mfasheh@xxxxxxxx>

ocfs2: Remove pointless !!

ocfs2_stack_supports_plocks() doesn't need this to properly return a zero or
one value.

Signed-off-by: Mark Fasheh <mfasheh@xxxxxxxx>
---
fs/ocfs2/stackglue.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/stackglue.c b/fs/ocfs2/stackglue.c
index 7150f5d..68b668b 100644
--- a/fs/ocfs2/stackglue.c
+++ b/fs/ocfs2/stackglue.c
@@ -290,7 +290,7 @@ EXPORT_SYMBOL_GPL(ocfs2_dlm_dump_lksb);

int ocfs2_stack_supports_plocks(void)
{
- return !!(active_stack && active_stack->sp_ops->plock);
+ return active_stack && active_stack->sp_ops->plock;
}
EXPORT_SYMBOL_GPL(ocfs2_stack_supports_plocks);

--
1.5.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/