]> git.hungrycats.org Git - linux/commit
[PATCH] libfs: move transaction file ops into libfs
authorJames Morris <jmorris@redhat.com>
Tue, 24 Aug 2004 04:31:13 +0000 (21:31 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 24 Aug 2004 04:31:13 +0000 (21:31 -0700)
commitf22f9adedabc7989fb81f24dc64de3b0715b8fa6
treea2db13fbcec1f20f4317acfd0e15613e891f6f65
parentef53b198e5a457487b148c5f6e84ae85e7c8df83
[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>
fs/libfs.c
fs/nfsd/nfsctl.c
include/linux/fs.h
security/selinux/selinuxfs.c