|
| 1 | +gfs2: Return enum evict_behavior from gfs2_upgrade_iopen_glock |
| 2 | + |
| 3 | +jira LE-3201 |
| 4 | +Rebuild_History Non-Buildable kernel-rt-4.18.0-553.27.1.rt7.368.el8_10 |
| 5 | +commit-author Andreas Gruenbacher <agruenba@redhat.com> |
| 6 | +commit a94dafe87d5fdded799fc25b82b123fb93959421 |
| 7 | +Empty-Commit: Cherry-Pick Conflicts during history rebuild. |
| 8 | +Will be included in final tarball splat. Ref for failed cherry-pick at: |
| 9 | +ciq/ciq_backports/kernel-rt-4.18.0-553.27.1.rt7.368.el8_10/a94dafe8.failed |
| 10 | + |
| 11 | +In case an iopen glock cannot be upgraded, function |
| 12 | +gfs2_upgrade_iopen_glock() needs to communicate to gfs2_evict_inode() |
| 13 | +whether deleting the inode should be deferred or skipped altogether. |
| 14 | +Change the function to return the appropriate enum evict_behavior value |
| 15 | +to indicate that. |
| 16 | + |
| 17 | + Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> |
| 18 | +(cherry picked from commit a94dafe87d5fdded799fc25b82b123fb93959421) |
| 19 | + Signed-off-by: Jonathan Maple <jmaple@ciq.com> |
| 20 | + |
| 21 | +# Conflicts: |
| 22 | +# fs/gfs2/super.c |
| 23 | +diff --cc fs/gfs2/super.c |
| 24 | +index 0857964a90b5,46d325c2ab88..000000000000 |
| 25 | +--- a/fs/gfs2/super.c |
| 26 | ++++ b/fs/gfs2/super.c |
| 27 | +@@@ -1389,12 -1364,15 +1394,19 @@@ static enum dinode_demise evict_should_ |
| 28 | + should_delete: |
| 29 | + if (gfs2_holder_initialized(&ip->i_iopen_gh) && |
| 30 | + test_bit(HIF_HOLDER, &ip->i_iopen_gh.gh_iflags)) { |
| 31 | +- if (!gfs2_upgrade_iopen_glock(inode)) { |
| 32 | ++ enum evict_behavior behavior = |
| 33 | ++ gfs2_upgrade_iopen_glock(inode); |
| 34 | ++ |
| 35 | ++ if (behavior != EVICT_SHOULD_DELETE) { |
| 36 | + gfs2_holder_uninit(&ip->i_iopen_gh); |
| 37 | +++<<<<<<< HEAD |
| 38 | + + return SHOULD_NOT_DELETE_DINODE; |
| 39 | +++======= |
| 40 | ++ return behavior; |
| 41 | +++>>>>>>> a94dafe87d5f (gfs2: Return enum evict_behavior from gfs2_upgrade_iopen_glock) |
| 42 | + } |
| 43 | + } |
| 44 | + - return EVICT_SHOULD_DELETE; |
| 45 | + + return SHOULD_DELETE_DINODE; |
| 46 | + } |
| 47 | + |
| 48 | + /** |
| 49 | +* Unmerged path fs/gfs2/super.c |
0 commit comments