* [PATCH] JFS: diAlloc() should return -EIO rather than EIO
@ 2008-05-27 7:55 Li Zefan
2008-05-28 14:02 ` [Jfs-discussion] " Dave Kleikamp
0 siblings, 1 reply; 2+ messages in thread
From: Li Zefan @ 2008-05-27 7:55 UTC (permalink / raw)
To: shaggy; +Cc: Andrew Morton, LKML, jfs-discussion
The comment above the function says one of its return value is -EIO,
and also the caller of diAlloc() checks for -EIO:
struct inode *ialloc(struct inode *parent, umode_t mode)
{
...
rc = diAlloc(parent, S_ISDIR(mode), inode);
if (rc) {
jfs_warn("ialloc: diAlloc returned %d!", rc);
if (rc == -EIO)
make_bad_inode(inode);
...
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
---
fs/jfs/jfs_imap.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index 734ec91..d6363d8 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -1520,7 +1520,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip)
jfs_error(ip->i_sb,
"diAlloc: can't find free bit "
"in wmap");
- return EIO;
+ return -EIO;
}
/* determine the inode number within the
-- 1.5.4.rc3
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [Jfs-discussion] [PATCH] JFS: diAlloc() should return -EIO rather than EIO
2008-05-27 7:55 [PATCH] JFS: diAlloc() should return -EIO rather than EIO Li Zefan
@ 2008-05-28 14:02 ` Dave Kleikamp
0 siblings, 0 replies; 2+ messages in thread
From: Dave Kleikamp @ 2008-05-28 14:02 UTC (permalink / raw)
To: Li Zefan; +Cc: Andrew Morton, LKML, jfs-discussion
On Tue, 2008-05-27 at 15:55 +0800, Li Zefan wrote:
> The comment above the function says one of its return value is -EIO,
> and also the caller of diAlloc() checks for -EIO:
>
> struct inode *ialloc(struct inode *parent, umode_t mode)
> {
> ...
> rc = diAlloc(parent, S_ISDIR(mode), inode);
> if (rc) {
> jfs_warn("ialloc: diAlloc returned %d!", rc);
> if (rc == -EIO)
> make_bad_inode(inode);
> ...
>
> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
> ---
> fs/jfs/jfs_imap.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
> index 734ec91..d6363d8 100644
> --- a/fs/jfs/jfs_imap.c
> +++ b/fs/jfs/jfs_imap.c
> @@ -1520,7 +1520,7 @@ int diAlloc(struct inode *pip, bool dir, struct inode *ip)
> jfs_error(ip->i_sb,
> "diAlloc: can't find free bit "
> "in wmap");
> - return EIO;
> + return -EIO;
> }
>
> /* determine the inode number within the
> -- 1.5.4.rc3
I'm not sure how this one escaped detection this long. I've added this
patch to the jfs git tree.
Thanks,
Shaggy
--
David Kleikamp
IBM Linux Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-28 14:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-27 7:55 [PATCH] JFS: diAlloc() should return -EIO rather than EIO Li Zefan
2008-05-28 14:02 ` [Jfs-discussion] " Dave Kleikamp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox