linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 1/2] Ext2: return ENOMEM rather than EIO if sb_getblk fails
@ 2011-01-16  5:10 Wang Shilong
  0 siblings, 0 replies; 3+ messages in thread
From: Wang Shilong @ 2011-01-16  5:10 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4

From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>

As the only reason that sb_getblks fails is that allocation fails.
It will be better to use ENOMEM rather than EIO.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
---
 fs/ext2/xattr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
index 06209ec..2d7557d 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
@@ -665,7 +665,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
 			if (unlikely(!new_bh)) {
 				ext2_free_blocks(inode, block, 1);
 				mark_inode_dirty(inode);
-				error = -EIO;
+				error = -ENOMEM;
 				goto cleanup;
 			}
 			lock_buffer(new_bh);
-- 1.7.7.6


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

* Re: [PATCH V2 1/2] Ext2: return ENOMEM rather than EIO if sb_getblk fails
  2013-01-16  5:19 [PATCH V2 1/2] Ext2: return ENOMEM rather than EIO if sb_getblk fails Wang Shilong
@ 2013-01-15 13:30 ` Jan Kara
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kara @ 2013-01-15 13:30 UTC (permalink / raw)
  To: Wang Shilong; +Cc: jack, linux-ext4

On Tue 15-01-13 21:19:06, Wang Shilong wrote:
> From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
> 
> As the only reason that sb_getblks fails is that allocation fails.
> It will be better to use ENOMEM rather than EIO.
  Thanks, I've merged the patch to my tree.

								Honza

> 
> Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
> ---
>  fs/ext2/xattr.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
> index 06209ec..2d7557d 100644
> --- a/fs/ext2/xattr.c
> +++ b/fs/ext2/xattr.c
> @@ -665,7 +665,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
>  			if (unlikely(!new_bh)) {
>  				ext2_free_blocks(inode, block, 1);
>  				mark_inode_dirty(inode);
> -				error = -EIO;
> +				error = -ENOMEM;
>  				goto cleanup;
>  			}
>  			lock_buffer(new_bh);
> -- 1.7.7.6
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

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

* [PATCH V2 1/2] Ext2: return ENOMEM rather than EIO if sb_getblk fails
@ 2013-01-16  5:19 Wang Shilong
  2013-01-15 13:30 ` Jan Kara
  0 siblings, 1 reply; 3+ messages in thread
From: Wang Shilong @ 2013-01-16  5:19 UTC (permalink / raw)
  To: jack; +Cc: linux-ext4

From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>

As the only reason that sb_getblks fails is that allocation fails.
It will be better to use ENOMEM rather than EIO.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
---
 fs/ext2/xattr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ext2/xattr.c b/fs/ext2/xattr.c
index 06209ec..2d7557d 100644
--- a/fs/ext2/xattr.c
+++ b/fs/ext2/xattr.c
@@ -665,7 +665,7 @@ ext2_xattr_set2(struct inode *inode, struct buffer_head *old_bh,
 			if (unlikely(!new_bh)) {
 				ext2_free_blocks(inode, block, 1);
 				mark_inode_dirty(inode);
-				error = -EIO;
+				error = -ENOMEM;
 				goto cleanup;
 			}
 			lock_buffer(new_bh);
-- 1.7.7.6


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

end of thread, other threads:[~2013-01-15 13:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-16  5:19 [PATCH V2 1/2] Ext2: return ENOMEM rather than EIO if sb_getblk fails Wang Shilong
2013-01-15 13:30 ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2011-01-16  5:10 Wang Shilong

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