• James Morris's avatar
    [PATCH] libfs: move transaction file ops into libfs · f22f9ade
    James Morris authored
    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: default avatarJames Morris <jmorris@redhat.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    f22f9ade
libfs.c 13 KB