2018-11-28 02:05:16

by Alexander Lochmann

[permalink] [raw]
Subject: [PATCH] Updated locking documentation for transaction_t

The following members of struct transaction_s aka transaction_t
were turned into lock-free variables in the past:
- t_updates
- t_outstanding_credits
- t_handle_count
However, the documentation has not been updated yet.
This commit replaced the annotated lock by [none].

Found by LockDoc (Alexander Lochmann, Horst Schirmeier and Olaf Spinczyk)

Signed-off-by: Alexander Lochmann <[email protected]>
Signed-off-by: Horst Schirmeier <[email protected]>
---
include/linux/jbd2.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index b708e5169d1d..f1cec174a4b8 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -662,13 +662,13 @@ struct transaction_s

/*
* Number of outstanding updates running on this transaction
- * [t_handle_lock]
+ * [none]
*/
atomic_t t_updates;

/*
* Number of buffers reserved for use by all handles in this transaction
- * handle but not yet modified. [t_handle_lock]
+ * handle but not yet modified. [none]
*/
atomic_t t_outstanding_credits;

@@ -690,7 +690,7 @@ struct transaction_s
ktime_t t_start_time;

/*
- * How many handles used this transaction? [t_handle_lock]
+ * How many handles used this transaction? [none]
*/
atomic_t t_handle_count;

--
2.19.1


Attachments:
signature.asc (833.00 B)
OpenPGP digital signature

2018-12-04 05:36:05

by Theodore Ts'o

[permalink] [raw]
Subject: Re: Updated locking documentation for transaction_t

On Tue, Nov 27, 2018 at 03:54:06PM +0100, Alexander Lochmann wrote:
> The following members of struct transaction_s aka transaction_t
> were turned into lock-free variables in the past:
> - t_updates
> - t_outstanding_credits
> - t_handle_count
> However, the documentation has not been updated yet.
> This commit replaced the annotated lock by [none].
>
> Found by LockDoc (Alexander Lochmann, Horst Schirmeier and Olaf Spinczyk)
>
> Signed-off-by: Alexander Lochmann <[email protected]>
> Signed-off-by: Horst Schirmeier <[email protected]>
> ---

Thanks, applied.

- Ted