Re: [PATCH v3] btrfs: improve error handling of btrfs_add_link()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/12/2018 13:52, David Sterba wrote:
> What I wanted is this:
> 
> --- a/fs/btrfs/inode.c
> +++ b/fs/btrfs/inode.c
> @@ -6360,12 +6360,16 @@ int btrfs_add_link(struct btrfs_trans_handle *trans,
>                                          root->root_key.objectid, parent_ino,
>                                          &local_index, name, name_len);
>  
> +               if (err)
> +                       btrrfs_abort_transaction(trans, err);
>         } else if (add_backref) {
>                 u64 local_index;
>                 int err;
>  
>                 err = btrfs_del_inode_ref(trans, root, name, name_len,
>                                           ino, parent_ino, &local_index);
> +               if (err)
> +                       btrrfs_abort_transaction(trans, err);
>         }
>         return ret;
>  }
> 
> Ie. each error has its own transaction abort that are not merged to one point.
> I believe I said this during the previous reviews.

Ah OK, I misunderstood you there. But now that I see it it makes sense.

Thanks,
	Johannes
-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumshirn@xxxxxxx                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux