Advertisement
Guest User

Untitled

a guest
Feb 25th, 2021
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 0.70 KB | None | 0 0
  1. diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c
  2. index af6246f36a9e..b3fd7b3af2b8 100644
  3. --- a/fs/btrfs/xattr.c
  4. +++ b/fs/btrfs/xattr.c
  5. @@ -231,7 +231,13 @@ int btrfs_setxattr_trans(struct inode *inode, const char *name,
  6.         struct btrfs_trans_handle *trans;
  7.         int ret;
  8.  
  9. -       trans = btrfs_start_transaction(root, 2);
  10. +       if (current->journal_info) {
  11. +               WARN_ON(strncmp(name, XATTR_SECURITY_PREFIX,
  12. +                               XATTR_SECURITY_PREFIX_LEN) != 0);
  13. +               trans = btrfs_join_transaction(root);
  14. +       } else {
  15. +               trans = btrfs_start_transaction(root, 2);
  16. +       }
  17.         if (IS_ERR(trans))
  18.                 return PTR_ERR(trans);
  19.  
  20.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement