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)
959959 gfs2_holder_uninit (& gh );
960960}
961961
962- static bool gfs2_try_evict (struct gfs2_glock * gl )
962+ static void gfs2_try_evict (struct gfs2_glock * gl )
963963{
964964 struct gfs2_inode * ip ;
965- bool evicted = false;
966965
967966 /*
968967 * 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)
997996 gfs2_glock_poke (ip -> i_gl );
998997 iput (& ip -> i_inode );
999998 }
1000- evicted = !ip ;
1001999 }
1002- return evicted ;
10031000}
10041001
10051002bool gfs2_queue_try_to_evict (struct gfs2_glock * gl )
@@ -1048,13 +1045,7 @@ static void delete_work_func(struct work_struct *work)
10481045 * care about compatibility with such nodes, we can skip this
10491046 * step entirely.
10501047 */
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 );
10581049 }
10591050
10601051 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)
14991499
15001500 gfs2_holder_mark_uninitialized (& gh );
15011501 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 );
15031509 goto out ;
1510+ }
15041511 if (behavior == EVICT_SHOULD_DELETE )
15051512 ret = evict_unlinked_inode (inode );
15061513 else
You can’t perform that action at this time.
0 commit comments