* [PATCH] ext4: fix return value of ext4_do_update_inode
@ 2014-09-29 1:58 Li Xi
2014-09-29 2:46 ` Eric Sandeen
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Li Xi @ 2014-09-29 1:58 UTC (permalink / raw)
To: linux-ext4, tytso, adilger, jack
When ext4_do_update_inode() gets error from ext4_inode_blocks_set(),
error number should be returned.
Signed-off-by: Li Xi <lixi@ddn.com>
---
fs/ext4/inode.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index d5dd7d4..03ddfd7 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4204,7 +4204,8 @@ static int ext4_do_update_inode(handle_t *handle,
EXT4_INODE_SET_XTIME(i_atime, inode, raw_inode);
EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
- if (ext4_inode_blocks_set(handle, raw_inode, ei)) {
+ err = ext4_inode_blocks_set(handle, raw_inode, ei);
+ if (err) {
spin_unlock(&ei->i_raw_lock);
goto out_brelse;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] ext4: fix return value of ext4_do_update_inode
2014-09-29 1:58 [PATCH] ext4: fix return value of ext4_do_update_inode Li Xi
@ 2014-09-29 2:46 ` Eric Sandeen
2014-09-29 11:30 ` Jan Kara
2014-10-02 2:22 ` Theodore Ts'o
2 siblings, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2014-09-29 2:46 UTC (permalink / raw)
To: Li Xi, linux-ext4, tytso, adilger, jack
On 9/28/14 8:58 PM, Li Xi wrote:
> When ext4_do_update_inode() gets error from ext4_inode_blocks_set(),
> error number should be returned.
How strange, it has been missing this error return ever since the
original commit in 2008. :)
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> Signed-off-by: Li Xi <lixi@ddn.com>
> ---
> fs/ext4/inode.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index d5dd7d4..03ddfd7 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -4204,7 +4204,8 @@ static int ext4_do_update_inode(handle_t *handle,
> EXT4_INODE_SET_XTIME(i_atime, inode, raw_inode);
> EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
>
> - if (ext4_inode_blocks_set(handle, raw_inode, ei)) {
> + err = ext4_inode_blocks_set(handle, raw_inode, ei);
> + if (err) {
> spin_unlock(&ei->i_raw_lock);
> goto out_brelse;
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ext4: fix return value of ext4_do_update_inode
2014-09-29 1:58 [PATCH] ext4: fix return value of ext4_do_update_inode Li Xi
2014-09-29 2:46 ` Eric Sandeen
@ 2014-09-29 11:30 ` Jan Kara
2014-10-02 2:22 ` Theodore Ts'o
2 siblings, 0 replies; 4+ messages in thread
From: Jan Kara @ 2014-09-29 11:30 UTC (permalink / raw)
To: Li Xi; +Cc: linux-ext4, tytso, adilger, jack
On Mon 29-09-14 09:58:34, Li Xi wrote:
> When ext4_do_update_inode() gets error from ext4_inode_blocks_set(),
> error number should be returned.
Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>
Honza
>
> Signed-off-by: Li Xi <lixi@ddn.com>
> ---
> fs/ext4/inode.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index d5dd7d4..03ddfd7 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -4204,7 +4204,8 @@ static int ext4_do_update_inode(handle_t *handle,
> EXT4_INODE_SET_XTIME(i_atime, inode, raw_inode);
> EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
>
> - if (ext4_inode_blocks_set(handle, raw_inode, ei)) {
> + err = ext4_inode_blocks_set(handle, raw_inode, ei);
> + if (err) {
> spin_unlock(&ei->i_raw_lock);
> goto out_brelse;
> }
> --
> 1.7.1
>
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ext4: fix return value of ext4_do_update_inode
2014-09-29 1:58 [PATCH] ext4: fix return value of ext4_do_update_inode Li Xi
2014-09-29 2:46 ` Eric Sandeen
2014-09-29 11:30 ` Jan Kara
@ 2014-10-02 2:22 ` Theodore Ts'o
2 siblings, 0 replies; 4+ messages in thread
From: Theodore Ts'o @ 2014-10-02 2:22 UTC (permalink / raw)
To: Li Xi; +Cc: linux-ext4, adilger, jack
On Mon, Sep 29, 2014 at 09:58:34AM +0800, Li Xi wrote:
> When ext4_do_update_inode() gets error from ext4_inode_blocks_set(),
> error number should be returned.
>
> Signed-off-by: Li Xi <lixi@ddn.com>
Applied, thanks.
- Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-10-02 2:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29 1:58 [PATCH] ext4: fix return value of ext4_do_update_inode Li Xi
2014-09-29 2:46 ` Eric Sandeen
2014-09-29 11:30 ` Jan Kara
2014-10-02 2:22 ` Theodore Ts'o
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).