Advertisement
anony_temp_user

0001-btrfs-qgroup-Add-extra-check-for-quota_root.patch

Sep 19th, 2015
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.00 KB | None | 0 0
  1. From 4ad22f2cc2a45b877e5d4e8381ac83be8d4fc147 Mon Sep 17 00:00:00 2001
  2. From: quwenruo <quwenruo@cn.fujitsu.com>
  3. Date: Sun, 20 Sep 2015 09:16:52 +0800
  4. Subject: [PATCH] btrfs: qgroup: Add extra check for quota_root
  5.  
  6. Some strange bug implies even for qgroup rescan, it's still possible
  7. quota_root is not initialized.
  8.  
  9. Root reason is still not sure, so this is just a temporary hotfix.
  10.  
  11. Signed-off-by: quwenruo <quwenruo@cn.fujitsu.com>
  12. ---
  13. fs/btrfs/qgroup.c | 7 +++++++
  14.  1 file changed, 7 insertions(+)
  15.  
  16. diff --git a/fs/btrfs/qgroup.c b/fs/btrfs/qgroup.c
  17. index 8a82029..a12ed9b 100644
  18. --- a/fs/btrfs/qgroup.c
  19. +++ b/fs/btrfs/qgroup.c
  20. @@ -2312,6 +2312,13 @@ out:
  21.     mutex_unlock(&fs_info->qgroup_rescan_lock);
  22.  
  23.     /*
  24. +    * XXX: Unknown bug which may race with quota_root init, avoid to
  25. +    * start transaction for NULL quota_root.
  26. +    */
  27. +   if (!fs_info->quota_root)
  28. +       goto done;
  29. +
  30. +   /*
  31.      * only update status, since the previous part has alreay updated the
  32.      * qgroup info.
  33.      */
  34. --
  35. 2.5.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement