Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1595312

Re: [PATCH 3/5] fs, xfs: convert xlog_ticket.t_ref from atomic_t to refcount_t

From Christoph Hellwig <hch@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH 3/5] fs, xfs: convert xlog_ticket.t_ref from atomic_t to refcount_t
Date 2017-03-08 17:00 +0100
Message-ID <tiMam-bQ-25@gated-at.bofh.it> (permalink)
References <tiFBU-3WM-7@gated-at.bofh.it> <tiI6K-5Wo-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> -	ASSERT(atomic_read(&ticket->t_ref) > 0);
> -	atomic_inc(&ticket->t_ref);
> +	ASSERT(refcount_read(&ticket->t_ref) > 0);
> +	refcount_inc(&ticket->t_ref);

With strict refcount semantics refcount_inc should check that
the count is larger than 0, otherwise we'd need to use 
recount_inc_not_zero or whatever you're going to call it.

Is that something the recount code does / could do?

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/5] fs, xfs refcount conversions Elena Reshetova <elena.reshetova@intel.com> - 2017-03-08 10:00 +0100
  [PATCH 5/5] fs, xfs: convert xfs_rui_log_item.rui_refcount from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-03-08 10:00 +0100
  [PATCH 1/5] fs, xfs: convert xfs_bui_log_item.bui_refcount from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-03-08 10:00 +0100
  [PATCH 2/5] fs, xfs: convert xfs_efi_log_item.efi_refcount from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-03-08 10:00 +0100
  [PATCH 3/5] fs, xfs: convert xlog_ticket.t_ref from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-03-08 12:40 +0100
    Re: [PATCH 3/5] fs, xfs: convert xlog_ticket.t_ref from atomic_t to  refcount_t Christoph Hellwig <hch@infradead.org> - 2017-03-08 17:00 +0100
      Re: [PATCH 3/5] fs, xfs: convert xlog_ticket.t_ref from atomic_t to refcount_t Kees Cook <keescook@chromium.org> - 2017-03-08 23:10 +0100
        RE: [PATCH 3/5] fs, xfs: convert xlog_ticket.t_ref from atomic_t to  refcount_t "Reshetova, Elena" <elena.reshetova@intel.com> - 2017-03-09 08:00 +0100
  [PATCH 4/5] fs, xfs: convert xfs_cui_log_item.cui_refcount from atomic_t to refcount_t Elena Reshetova <elena.reshetova@intel.com> - 2017-03-08 15:40 +0100

csiph-web