lkml.org 
[lkml]   [2016]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/3] befs: avoid dereferencing dentry twice
Date
No need to dereference dentry twice to get the name when we already have
it stored in a local variable.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
---

Hi,

3 more things I noticed while familiarizing myself with the code of this
filesystem. Enjoying very much learning how it works.

Thanks,
Luis

fs/befs/linuxvfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 619b998..6740b0d 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -179,7 +179,7 @@ befs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
kfree(utfname);

} else {
- ret = befs_btree_find(sb, ds, dentry->d_name.name, &offset);
+ ret = befs_btree_find(sb, ds, name, &offset);
}

if (ret == BEFS_BT_NOT_FOUND) {
--
2.5.1
\
 
 \ /
  Last update: 2016-07-01 02:41    [W:0.051 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site