Commit-ID: 44eea45ca9e25d6dd660d4806ef4c11209609e03 Gitweb: http://git.kernel.org/tip/44eea45ca9e25d6dd660d4806ef4c11209609e03 Author: Ingo Molnar <mingo@xxxxxxx> AuthorDate: Wed, 25 Mar 2009 16:48:35 +0100 Committer: Ingo Molnar <mingo@xxxxxxx> CommitDate: Wed, 25 Mar 2009 17:48:14 +0100 fs.h: uninline simple_transaction_set() Move simple_transaction_set() to the other simple-transaction file helpers in fs/libfs.c. This removes an implicit asm/page.h PAGE_SIZE dependency from fs.h (asm/page.h is not an exported header so HEADERS_CHECK fils), and also reduces kernel size a bit. Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxxxxxx> Cc: Eduard - Gabriel Munteanu <eduard.munteanu@xxxxxxxxxxx> Cc: paulmck@xxxxxxxxxxxxxxxxxx LKML-Reference: <1237898630.25315.83.camel@penberg-laptop> Signed-off-by: Ingo Molnar <mingo@xxxxxxx> --- fs/libfs.c | 15 +++++++++++++++ include/linux/fs.h | 16 +--------------- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/fs/libfs.c b/fs/libfs.c index 49b4409..a1db380 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -574,6 +574,21 @@ ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, * possibly a read which collects the result - which is stored in a * file-local buffer. */ + +void simple_transaction_set(struct file *file, size_t n) +{ + struct simple_transaction_argresp *ar = file->private_data; + + BUG_ON(n > SIMPLE_TRANSACTION_LIMIT); + + /* + * The barrier ensures that ar->size will really remain zero until + * ar->data is ready for reading. + */ + smp_mb(); + ar->size = n; +} + char *simple_transaction_get(struct file *file, const char __user *buf, size_t size) { struct simple_transaction_argresp *ar; diff --git a/include/linux/fs.h b/include/linux/fs.h index 79be937..2ebe3ce 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -9,8 +9,6 @@ #include <linux/limits.h> #include <linux/ioctl.h> -#include <asm/page.h> /* for PAGE_SIZE */ - /* * It's silly to have NR_OPEN bigger than NR_FILE, but you can change * the file limit at runtime and only root can increase the per-process @@ -2173,19 +2171,7 @@ ssize_t simple_transaction_read(struct file *file, char __user *buf, size_t size, loff_t *pos); int simple_transaction_release(struct inode *inode, struct file *file); -static inline void simple_transaction_set(struct file *file, size_t n) -{ - struct simple_transaction_argresp *ar = file->private_data; - - BUG_ON(n > SIMPLE_TRANSACTION_LIMIT); - - /* - * The barrier ensures that ar->size will really remain zero until - * ar->data is ready for reading. - */ - smp_mb(); - ar->size = n; -} +void simple_transaction_set(struct file *file, size_t n); /* * simple attribute files -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html