public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] fs: befs: Lookup must return error code only on real error
@ 2016-06-04 18:53 Salah Triki
  2016-06-04 18:53 ` [PATCH 2/3] fs: befs: Insert NULL inode to dentry Salah Triki
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Salah Triki @ 2016-06-04 18:53 UTC (permalink / raw)
  To: akpm; +Cc: Salah Triki, linux-kernel

File not found is not an error and lookup must return error code only
on real error, otherwise creating inodes with functions like create,
mkdir and so on will fail.

Signed-off-by: Salah Triki <salah.triki@acm.org>
---
 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 c734f21..e0bd6c7 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -184,7 +184,7 @@ befs_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags)
 
 	if (ret == BEFS_BT_NOT_FOUND) {
 		befs_debug(sb, "<--- %s %pd not found", __func__, dentry);
-		return ERR_PTR(-ENOENT);
+		return NULL;
 
 	} else if (ret != BEFS_OK || offset == 0) {
 		befs_warning(sb, "<--- %s Error", __func__);
-- 
1.9.1

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

end of thread, other threads:[~2016-06-04 20:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-04 18:53 [PATCH 1/3] fs: befs: Lookup must return error code only on real error Salah Triki
2016-06-04 18:53 ` [PATCH 2/3] fs: befs: Insert NULL inode to dentry Salah Triki
2016-06-04 18:53 ` [PATCH 3/3] fs: befs: Increment i_count when inode is found Salah Triki
2016-06-04 19:14   ` kbuild test robot
2016-06-04 19:32   ` Al Viro
2016-06-04 20:03     ` Salah Triki
2016-06-04 19:37 ` [PATCH 1/3] fs: befs: Lookup must return error code only on real error Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox