Repository navigation
Commit 82e938b
committed
gfs2: Upgrade shared glocks for atime updates
Commit 20f8299 ("gfs2: Rework read and page fault locking") lifted
the glock lock taking from the low-level ->readpage and ->readahead
address space operations to the higher-level ->read_iter file and
->fault vm operations. The glocks are still taken in LM_ST_SHARED mode
only. On filesystems mounted without the noatime option, ->read_iter
sometimes needs to update the atime as well, though. Right now, this
leads to a failed locking mode assertion in gfs2_dirty_inode.
Fix that by introducing a new update_time inode operation. There, if
the glock is held non-exclusively, upgrade it to an exclusive lock.
Reported-by: Alexander Aring <aahringo@redhat.com>
Fixes: 20f8299 ("gfs2: Rework read and page fault locking")
Cc: stable@vger.kernel.org # v5.8+
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>1 parent f39e7d3 commit 82e938b
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2116 | 2116 | | |
2117 | 2117 | | |
2118 | 2118 | | |
| 2119 | + | |
| 2120 | + | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
2119 | 2138 | | |
2120 | 2139 | | |
2121 | 2140 | | |
| |||
2124 | 2143 | | |
2125 | 2144 | | |
2126 | 2145 | | |
| 2146 | + | |
2127 | 2147 | | |
2128 | 2148 | | |
2129 | 2149 | | |
| |||
2143 | 2163 | | |
2144 | 2164 | | |
2145 | 2165 | | |
| 2166 | + | |
2146 | 2167 | | |
2147 | 2168 | | |
2148 | 2169 | | |
| |||
0 commit comments