diff options
author | zhangwei(Jovi) <jovi.zhangwei@huawei.com> | 2013-04-18 09:49:24 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2013-04-24 17:26:38 +1000 |
commit | 4ec4595a8a1d890d147543eb264b0028cb04157e (patch) | |
tree | 0782a6bd5be01ae6e91682996625665fc31cf74d /kernel | |
parent | a532dad5efbe642d9cdd05a0a693abdb85a0539e (diff) |
relay: use macro PAGE_ALIGN instead of FIX_SIZE
Macro FIX_SIZE is same as PAGE_ALIGN at present, so use PAGE_ALIGN
instead.
Thanks Andrew found this.
Signed-off-by: zhangwei(Jovi) <jovi.zhangwei@huawei.com>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/relay.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/kernel/relay.c b/kernel/relay.c index 4c2959b6c34d..eef0d113b79e 100644 --- a/kernel/relay.c +++ b/kernel/relay.c @@ -550,9 +550,6 @@ static int __cpuinit relay_hotcpu_callback(struct notifier_block *nb, return NOTIFY_OK; } -/* Needs a _much_ better name... */ -#define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE) - /** * relay_open - create a new relay channel * @base_filename: base name of files to create, %NULL for buffering only @@ -591,7 +588,7 @@ struct rchan *relay_open(const char *base_filename, chan->version = RELAYFS_CHANNEL_VERSION; chan->n_subbufs = n_subbufs; chan->subbuf_size = subbuf_size; - chan->alloc_size = FIX_SIZE(subbuf_size * n_subbufs); + chan->alloc_size = PAGE_ALIGN(subbuf_size * n_subbufs); chan->parent = parent; chan->private_data = private_data; if (base_filename) { |