diff options
author | zhangwei(Jovi) <jovi.zhangwei@huawei.com> | 2013-04-30 18:28:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 20:04:09 -0400 |
commit | a05342cbd62b7f6dacb8d71683d799f5e5e694b8 (patch) | |
tree | 5d606df07845f07ecfd44e4498139ac2bbc13d9c | |
parent | 536b39ecf1b52ab71c2c126db0137611b9e1a4d4 (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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-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, | |||
550 | return NOTIFY_OK; | 550 | return NOTIFY_OK; |
551 | } | 551 | } |
552 | 552 | ||
553 | /* Needs a _much_ better name... */ | ||
554 | #define FIX_SIZE(x) ((((x) - 1) & PAGE_MASK) + PAGE_SIZE) | ||
555 | |||
556 | /** | 553 | /** |
557 | * relay_open - create a new relay channel | 554 | * relay_open - create a new relay channel |
558 | * @base_filename: base name of files to create, %NULL for buffering only | 555 | * @base_filename: base name of files to create, %NULL for buffering only |
@@ -591,7 +588,7 @@ struct rchan *relay_open(const char *base_filename, | |||
591 | chan->version = RELAYFS_CHANNEL_VERSION; | 588 | chan->version = RELAYFS_CHANNEL_VERSION; |
592 | chan->n_subbufs = n_subbufs; | 589 | chan->n_subbufs = n_subbufs; |
593 | chan->subbuf_size = subbuf_size; | 590 | chan->subbuf_size = subbuf_size; |
594 | chan->alloc_size = FIX_SIZE(subbuf_size * n_subbufs); | 591 | chan->alloc_size = PAGE_ALIGN(subbuf_size * n_subbufs); |
595 | chan->parent = parent; | 592 | chan->parent = parent; |
596 | chan->private_data = private_data; | 593 | chan->private_data = private_data; |
597 | if (base_filename) { | 594 | if (base_filename) { |