Merge tag 'for-5.13-rc1-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 May 2021 16:43:16 +0000 (09:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 11 May 2021 16:43:16 +0000 (09:43 -0700)
Pull btrfs fix from David Sterba:
 "Handle transaction start error in btrfs_fileattr_set()

  This is fix for code introduced by the new fileattr merge"

* tag 'for-5.13-rc1-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  btrfs: handle transaction start error in btrfs_fileattr_set

1  2 
fs/btrfs/ioctl.c

diff --combined fs/btrfs/ioctl.c
@@@ -259,6 -259,8 +259,8 @@@ int btrfs_fileattr_set(struct user_name
        if (!fa->flags_valid) {
                /* 1 item for the inode */
                trans = btrfs_start_transaction(root, 1);
+               if (IS_ERR(trans))
+                       return PTR_ERR(trans);
                goto update_flags;
        }
  
@@@ -907,7 -909,7 +909,7 @@@ static noinline int btrfs_mksnapshot(co
         */
        btrfs_drew_read_lock(&root->snapshot_lock);
  
 -      ret = btrfs_start_delalloc_snapshot(root);
 +      ret = btrfs_start_delalloc_snapshot(root, false);
        if (ret)
                goto out;