All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] befs: avoid dereferencing dentry twice
@ 2016-07-01  0:07 Luis de Bethencourt
  2016-07-01  0:07 ` [PATCH 2/3] befs: remove constant variable Luis de Bethencourt
  2016-07-01  0:07 ` [PATCH 3/3] befs: use simpler while loop Luis de Bethencourt
  0 siblings, 2 replies; 4+ messages in thread
From: Luis de Bethencourt @ 2016-07-01  0:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: akpm, salah.triki, viro, hannes, vdavydov, Luis de Bethencourt

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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-07-28  0:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-01  0:07 [PATCH 1/3] befs: avoid dereferencing dentry twice Luis de Bethencourt
2016-07-01  0:07 ` [PATCH 2/3] befs: remove constant variable Luis de Bethencourt
2016-07-28  0:11   ` Salah Triki
2016-07-01  0:07 ` [PATCH 3/3] befs: use simpler while loop Luis de Bethencourt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.