summaryrefslogtreecommitdiffstats
path: root/net/ceph/snapshot.c
Commit message (Collapse)AuthorAgeFilesLines
* libceph: convert ceph_snap_context.nref from atomic_t to refcount_tElena Reshetova2017-05-041-3/+3
| | | | | | | | | | | | | | refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental refcounter overflows that might lead to use-after-free situations. Signed-off-by: Elena Reshetova <elena.reshetova@intel.com> Signed-off-by: Hans Liljestrand <ishkamiel@gmail.com> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: David Windsor <dwindsor@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
* libceph: remove unneeded stddef.h includeStafford Horne2017-02-201-2/+0
| | | | | | | | | | | This was causing a build failure for openrisc when using musl and gcc 5.4.0 since the file is not available in the toolchain. It doesnt seem this is needed and removing it does not cause any build warnings for me. Signed-off-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
* libceph: create source file "net/ceph/snapshot.c"Alex Elder2013-05-011-0/+78
This creates a new source file "net/ceph/snapshot.c" to contain utility routines related to ceph snapshot contexts. The main motivation was to define ceph_create_snap_context() as a common way to create these structures, but I've moved the definitions of ceph_get_snap_context() and ceph_put_snap_context() there too. (The benefit of inlining those is very small, and I'd rather keep this collection of functions together.) Signed-off-by: Alex Elder <elder@inktank.com> Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
OpenPOWER on IntegriCloud