]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: add reference counting to libmount_fs
authorKarel Zak <kzak@redhat.com>
Wed, 21 Aug 2013 10:31:43 +0000 (12:31 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 21 Aug 2013 10:48:42 +0000 (12:48 +0200)
commit26d0c0aefde9a94f29d9850514fcbcf638eb8728
treecfe01b73d0d399baeeb5bdf1ffb8e6cdd6a38708
parent6d5189376d92cf8855a4745f6c8429e83f7b11e0
libmount: add reference counting to libmount_fs

 * mnt_new_fs() returns object with refcount=1
 * mnt_free_fs() does not care about reference counter

 * new functions mnt_ref_fs() and mnt_unref_fs()

 * mnt_table_add_fs() and mnt_table_rem_fs() uses reference counter

 * libmmnt_context uses reference counter for internal FS (as it could be
   shared outside the context)

 * backwardly incompatible change:

- FS could be deallocated after mnt_table_remove_fs()

 * it's recommended to use mnt_unref_fs() after mnt_table_add_fs()

Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/docs/libmount-sections.txt
libmount/src/context.c
libmount/src/fs.c
libmount/src/libmount.h.in
libmount/src/libmount.sym
libmount/src/mountP.h
libmount/src/tab.c
libmount/src/tab_diff.c
libmount/src/tab_parse.c
libmount/src/tab_update.c