[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120127063726.16227.681.stgit@ltc219.sdl.hitachi.co.jp>
Date: Fri, 27 Jan 2012 15:37:26 +0900
From: Mitsuo Hayasaka <mitsuo.hayasaka.hu@...achi.com>
To: Ben Myers <bpm@....com>, Alex Elder <aelder@....com>,
Christoph Hellwig <hch@....de>
Cc: xfs-masters@....sgi.com, xfs@....sgi.com,
linux-kernel@...r.kernel.org, yrl.pp-manager.tt@...achi.com,
Mitsuo Hayasaka <mitsuo.hayasaka.hu@...achi.com>,
Ben Myers <bpm@....com>, Alex Elder <elder@...nel.org>,
Christoph Hellwig <hch@....de>
Subject: [RFC PATCH] xfs: pass KM_SLEEP flag to kmem_realloc() in
xlog_recover_add_to_cnt_trans()
The kmem_realloc() in xfs is given KM_* memory allocation flags. And it
allocates memory using kmalloc() after they are converted to gfp_mask
flags. In xlog_recover_add_to_cont_trans(), 0u is passed to kmem_realloc(),
instead of them. I guess it is preferred to use them, and here memory must
be allocated but don't have to be done with GFP_ATOMIC. So, this patch
changes it to KM_SLEEP.
Signed-off-by: Mitsuo Hayasaka <mitsuo.hayasaka.hu@...achi.com>
Cc: Ben Myers <bpm@....com>
Cc: Alex Elder <elder@...nel.org>
Cc: Christoph Hellwig <hch@....de>
---
fs/xfs/xfs_log_recover.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 541a508..15ff539 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -1489,7 +1489,7 @@ xlog_recover_add_to_cont_trans(
old_ptr = item->ri_buf[item->ri_cnt-1].i_addr;
old_len = item->ri_buf[item->ri_cnt-1].i_len;
- ptr = kmem_realloc(old_ptr, len+old_len, old_len, 0u);
+ ptr = kmem_realloc(old_ptr, len+old_len, old_len, KM_SLEEP);
memcpy(&ptr[old_len], dp, len); /* d, s, l */
item->ri_buf[item->ri_cnt-1].i_len += len;
item->ri_buf[item->ri_cnt-1].i_addr = ptr;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists