[PATCH] libfs: move transaction file ops into libfs
Below is an updated version of the patch which moves duplicated
transaction-based file operation code into libfs. Since the last post, the
patch has been through a couple of iterations with Al, who suggested a
number of cleanups including locking and interface simplification.
For filesystem writers, the interface is now much simpler. The
simple_transaction_get() helper should be part of the file op write method.
This safely obtains the transaction request data during write(), allocates
a page for it and stores it there. The data is returned to the caller for
potential further processing, which then makes it available for the next
read() call via simple_transaction_set(). See the selinuxfs and nfsctl
code for examples of use.
Signed-off-by: James Morris <jmorris@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>