* [PATCH] fs: kernfs: file.c: Drop the condition with no effect.
@ 2019-10-29 9:55 Saurav Girepunje
2019-10-29 13:21 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Saurav Girepunje @ 2019-10-29 9:55 UTC (permalink / raw)
To: gregkh, tj, linux-kernel; +Cc: saurav.girepunje
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-29 13:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-29 9:55 [PATCH] fs: kernfs: file.c: Drop the condition with no effect Saurav Girepunje
2019-10-29 13:21 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox