linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saurav Girepunje <saurav.girepunje@gmail.com>
To: gregkh@linuxfoundation.org, tj@kernel.org, linux-kernel@vger.kernel.org
Cc: saurav.girepunje@hotmail.com
Subject: [PATCH] fs: kernfs: file.c: Drop the condition with no effect.
Date: Tue, 29 Oct 2019 15:25:52 +0530	[thread overview]
Message-ID: <20191029095552.GA11561@saurav> (raw)

As the "if" and "else" branch body are identical the condition
has no effect. So drop the if,else condition.

Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
---
 fs/kernfs/file.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c
index e8c792b49616..d8123d8cfdcc 100644
--- a/fs/kernfs/file.c
+++ b/fs/kernfs/file.c
@@ -663,10 +663,7 @@ static int kernfs_fop_open(struct inode *inode, struct file *file)
 	 * Both paths of the branch look the same.  They're supposed to
 	 * look that way and give @of->mutex different static lockdep keys.
 	 */
-	if (has_mmap)
-		mutex_init(&of->mutex);
-	else
-		mutex_init(&of->mutex);
+	mutex_init(&of->mutex);
 
 	of->kn = kn;
 	of->file = file;
-- 
2.20.1


             reply	other threads:[~2019-10-29  9:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-29  9:55 Saurav Girepunje [this message]
2019-10-29 13:21 ` [PATCH] fs: kernfs: file.c: Drop the condition with no effect Tejun Heo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191029095552.GA11561@saurav \
    --to=saurav.girepunje@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=saurav.girepunje@hotmail.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).