Repository navigation
Commit d84560f
jbd2: Simplify journal_unmap_buffer()
journal_unmap_buffer() checks first whether the buffer head is a journal.
If so it takes locks and then invokes jbd2_journal_grab_journal_head()
followed by another check whether this is journal head buffer.
The double checking is pointless.
Replace the initial check with jbd2_journal_grab_journal_head() which
alredy checks whether the buffer head is actually a journal.
Allows also early access to the journal head pointer for the upcoming
conversion of state lock to a regular spinlock.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20190809124233.13277-2-jack@suse.cz
Signed-off-by: Theodore Ts'o <tytso@mit.edu>1 parent 4f5cafb commit d84560f
1 file changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2199 | 2199 | | |
2200 | 2200 | | |
2201 | 2201 | | |
2202 | | - | |
| 2202 | + | |
| 2203 | + | |
2203 | 2204 | | |
2204 | 2205 | | |
2205 | 2206 | | |
2206 | 2207 | | |
2207 | 2208 | | |
2208 | 2209 | | |
2209 | 2210 | | |
2210 | | - | |
2211 | | - | |
2212 | | - | |
2213 | | - | |
2214 | 2211 | | |
2215 | 2212 | | |
2216 | 2213 | | |
| |||
2332 | 2329 | | |
2333 | 2330 | | |
2334 | 2331 | | |
2335 | | - | |
2336 | 2332 | | |
2337 | 2333 | | |
2338 | 2334 | | |
| |||
0 commit comments