linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch]anon_inodes.c: fix error check in anon_inode_getfd
@ 2007-09-27  2:30 Yan Zheng
  2007-09-27  3:59 ` Andrew Morton
  0 siblings, 1 reply; 8+ messages in thread
From: Yan Zheng @ 2007-09-27  2:30 UTC (permalink / raw)
  To: linux-fsdevel, akpm

Hello,

igrab return NULL on error.

Signed-off-by: Yan Zheng<yanzheng@21cn.com>
---
diff -ur linux-2.6.23-rc8/fs/anon_inodes.c linux/fs/anon_inodes.c
--- linux-2.6.23-rc8/fs/anon_inodes.c	2007-09-27 10:05:07.000000000 +0800
+++ linux/fs/anon_inodes.c	2007-09-27 10:18:26.000000000 +0800
@@ -87,8 +87,8 @@
 		return -ENFILE;

 	inode = igrab(anon_inode_inode);
-	if (IS_ERR(inode)) {
-		error = PTR_ERR(inode);
+	if (!inode) {
+		error = -ENOENT;
 		goto err_put_filp;
 	}

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

end of thread, other threads:[~2007-09-27 18:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-27  2:30 [patch]anon_inodes.c: fix error check in anon_inode_getfd Yan Zheng
2007-09-27  3:59 ` Andrew Morton
2007-09-27 16:41   ` Davide Libenzi
2007-09-27 16:54     ` Davide Libenzi
2007-09-27 17:40       ` Andrew Morton
2007-09-27 17:56         ` Davide Libenzi
2007-09-27 18:20           ` Andrew Morton
2007-09-27 18:25             ` Davide Libenzi

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).