diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2010-04-06 14:33:58 -0700 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-05-17 15:25:42 -0700 |
commit | 34d23762d988b7dcb08390ac72a353df3d60193c (patch) | |
tree | 3a49d039527548697165da2b8789f3588b95ffed /fs/ceph/messenger.c | |
parent | 23804d91f112df09b832cd091b71af4dc2831aa8 (diff) | |
download | linux-3.10-34d23762d988b7dcb08390ac72a353df3d60193c.tar.gz linux-3.10-34d23762d988b7dcb08390ac72a353df3d60193c.tar.bz2 linux-3.10-34d23762d988b7dcb08390ac72a353df3d60193c.zip |
ceph: all allocation functions should get gfp_mask
This is essential, as for the rados block device we'll need
to run in different contexts that would need flags that
are other than GFP_NOFS.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/messenger.c')
-rw-r--r-- | fs/ceph/messenger.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c index 50c5f24086f..60b74839ebe 100644 --- a/fs/ceph/messenger.c +++ b/fs/ceph/messenger.c @@ -2070,11 +2070,11 @@ void ceph_con_keepalive(struct ceph_connection *con) * construct a new message with given type, size * the new msg has a ref count of 1. */ -struct ceph_msg *ceph_msg_new(int type, int front_len) +struct ceph_msg *ceph_msg_new(int type, int front_len, gfp_t flags) { struct ceph_msg *m; - m = kmalloc(sizeof(*m), GFP_NOFS); + m = kmalloc(sizeof(*m), flags); if (m == NULL) goto out; kref_init(&m->kref); @@ -2101,11 +2101,11 @@ struct ceph_msg *ceph_msg_new(int type, int front_len) /* front */ if (front_len) { if (front_len > PAGE_CACHE_SIZE) { - m->front.iov_base = __vmalloc(front_len, GFP_NOFS, + m->front.iov_base = __vmalloc(front_len, flags, PAGE_KERNEL); m->front_is_vmalloc = true; } else { - m->front.iov_base = kmalloc(front_len, GFP_NOFS); + m->front.iov_base = kmalloc(front_len, flags); } if (m->front.iov_base == NULL) { pr_err("msg_new can't allocate %d bytes\n", @@ -2180,7 +2180,7 @@ static struct ceph_msg *ceph_alloc_msg(struct ceph_connection *con, } if (!msg) { *skip = 0; - msg = ceph_msg_new(type, front_len); + msg = ceph_msg_new(type, front_len, GFP_NOFS); if (!msg) { pr_err("unable to allocate msg type %d len %d\n", type, front_len); |