diff mbox

[15/17] xfs_bmap_add_attrfork(): re-add error handling from set_attrforkoff() call

Message ID 1508367333-3237-16-git-send-email-allison.henderson@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Allison Henderson Oct. 18, 2017, 10:55 p.m. UTC
From: Brian Foster <bfoster@redhat.com>

- fix for "xfs: parent pointer attribute creation"

[achender: rebased]

Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
---
 fs/xfs/libxfs/xfs_bmap.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Darrick J. Wong Oct. 19, 2017, 7:43 p.m. UTC | #1
On Wed, Oct 18, 2017 at 03:55:31PM -0700, Allison Henderson wrote:
> From: Brian Foster <bfoster@redhat.com>
> 
> - fix for "xfs: parent pointer attribute creation"
> 
> [achender: rebased]

Please fold this into that patch.

--D

> 
> Signed-off-by: Brian Foster <bfoster@redhat.com>
> Signed-off-by: Allison Henderson <allison.henderson@oracle.com>
> ---
>  fs/xfs/libxfs/xfs_bmap.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index 7ee98be..a631fe1 100644
> --- a/fs/xfs/libxfs/xfs_bmap.c
> +++ b/fs/xfs/libxfs/xfs_bmap.c
> @@ -1149,7 +1149,9 @@ xfs_bmap_add_attrfork(
>  	xfs_trans_ijoin(tp, ip, 0);
>  	xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
>  
> -	xfs_bmap_set_attrforkoff(ip, size, &version);
> +	error = xfs_bmap_set_attrforkoff(ip, size, &version);
> +	if (error)
> +		goto trans_cancel;
>  
>  	ASSERT(ip->i_afp == NULL);
>  	ip->i_afp = kmem_zone_zalloc(xfs_ifork_zone, KM_SLEEP);
> -- 
> 2.7.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Allison Henderson Oct. 21, 2017, 1:13 a.m. UTC | #2
On 10/19/2017 12:43 PM, Darrick J. Wong wrote:
> On Wed, Oct 18, 2017 at 03:55:31PM -0700, Allison Henderson wrote:
>> From: Brian Foster<bfoster@redhat.com>
>>
>> - fix for "xfs: parent pointer attribute creation"
>>
>> [achender: rebased]
> Please fold this into that patch.
>
> --D
>
Sure, will do
>> Signed-off-by: Brian Foster<bfoster@redhat.com>
>> Signed-off-by: Allison Henderson<allison.henderson@oracle.com>
>> ---
>>   fs/xfs/libxfs/xfs_bmap.c | 4 +++-
>>   1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
>> index 7ee98be..a631fe1 100644
>> --- a/fs/xfs/libxfs/xfs_bmap.c
>> +++ b/fs/xfs/libxfs/xfs_bmap.c
>> @@ -1149,7 +1149,9 @@ xfs_bmap_add_attrfork(
>>   	xfs_trans_ijoin(tp, ip, 0);
>>   	xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
>>   
>> -	xfs_bmap_set_attrforkoff(ip, size, &version);
>> +	error = xfs_bmap_set_attrforkoff(ip, size, &version);
>> +	if (error)
>> +		goto trans_cancel;
>>   
>>   	ASSERT(ip->i_afp == NULL);
>>   	ip->i_afp = kmem_zone_zalloc(xfs_ifork_zone, KM_SLEEP);
>> -- 
>> 2.7.4
>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
>> the body of a message tomajordomo@vger.kernel.org
>> More majordomo info athttp://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
index 7ee98be..a631fe1 100644
--- a/fs/xfs/libxfs/xfs_bmap.c
+++ b/fs/xfs/libxfs/xfs_bmap.c
@@ -1149,7 +1149,9 @@  xfs_bmap_add_attrfork(
 	xfs_trans_ijoin(tp, ip, 0);
 	xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
 
-	xfs_bmap_set_attrforkoff(ip, size, &version);
+	error = xfs_bmap_set_attrforkoff(ip, size, &version);
+	if (error)
+		goto trans_cancel;
 
 	ASSERT(ip->i_afp == NULL);
 	ip->i_afp = kmem_zone_zalloc(xfs_ifork_zone, KM_SLEEP);