diff mbox

Btrfs: use arg gfp_t to decide how to allocate tree mod

Message ID 1367730748-7827-1-git-send-email-wangshilong1991@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wang Shilong May 5, 2013, 5:12 a.m. UTC
From: Wang Shilong <wangsl-fnst@cn.fujitsu.com>

We have passed arg gfp_t to tree_mod_alloc(), so
just use it rather than always use GFP_ATOMIC.

Signed-off-by: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
---
 fs/btrfs/ctree.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c
index de6de8e..0e3514f 100644
--- a/fs/btrfs/ctree.c
+++ b/fs/btrfs/ctree.c
@@ -553,7 +553,7 @@  static inline int tree_mod_alloc(struct btrfs_fs_info *fs_info, gfp_t flags,
 	 * once we switch from spin locks to something different, we should
 	 * honor the flags parameter here.
 	 */
-	tm = *tm_ret = kzalloc(sizeof(*tm), GFP_ATOMIC);
+	tm = *tm_ret = kzalloc(sizeof(*tm), flags);
 	if (!tm)
 		return -ENOMEM;