File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -959,10 +959,9 @@ static void gfs2_glock_poke(struct gfs2_glock *gl)
959
959
gfs2_holder_uninit (& gh );
960
960
}
961
961
962
- static bool gfs2_try_evict (struct gfs2_glock * gl )
962
+ static void gfs2_try_evict (struct gfs2_glock * gl )
963
963
{
964
964
struct gfs2_inode * ip ;
965
- bool evicted = false;
966
965
967
966
/*
968
967
* If there is contention on the iopen glock and we have an inode, try
@@ -997,9 +996,7 @@ static bool gfs2_try_evict(struct gfs2_glock *gl)
997
996
gfs2_glock_poke (ip -> i_gl );
998
997
iput (& ip -> i_inode );
999
998
}
1000
- evicted = !ip ;
1001
999
}
1002
- return evicted ;
1003
1000
}
1004
1001
1005
1002
bool gfs2_queue_try_to_evict (struct gfs2_glock * gl )
@@ -1048,13 +1045,7 @@ static void delete_work_func(struct work_struct *work)
1048
1045
* care about compatibility with such nodes, we can skip this
1049
1046
* step entirely.
1050
1047
*/
1051
- if (gfs2_try_evict (gl )) {
1052
- if (!test_bit (SDF_KILL , & sdp -> sd_flags )) {
1053
- gfs2_glock_hold (gl );
1054
- if (!gfs2_queue_verify_delete (gl , true))
1055
- gfs2_glock_put (gl );
1056
- }
1057
- }
1048
+ gfs2_try_evict (gl );
1058
1049
}
1059
1050
1060
1051
if (verify_delete ) {
Original file line number Diff line number Diff line change @@ -1499,8 +1499,15 @@ static void gfs2_evict_inode(struct inode *inode)
1499
1499
1500
1500
gfs2_holder_mark_uninitialized (& gh );
1501
1501
behavior = evict_should_delete (inode , & gh );
1502
- if (behavior == EVICT_SHOULD_DEFER_DELETE )
1502
+ if (behavior == EVICT_SHOULD_DEFER_DELETE &&
1503
+ !test_bit (SDF_KILL , & sdp -> sd_flags )) {
1504
+ struct gfs2_glock * io_gl = ip -> i_iopen_gh .gh_gl ;
1505
+
1506
+ gfs2_glock_hold (io_gl );
1507
+ if (!gfs2_queue_verify_delete (io_gl , true))
1508
+ gfs2_glock_put (io_gl );
1503
1509
goto out ;
1510
+ }
1504
1511
if (behavior == EVICT_SHOULD_DELETE )
1505
1512
ret = evict_unlinked_inode (inode );
1506
1513
else
You can’t perform that action at this time.
0 commit comments