Skip to content

Commit 5b35158

Browse files
author
Andreas Gruenbacher
committed
gfs2: Minor cosmetic remote delete cleanups
Rename gfs2_try_evict() to gfs2_try_to_evict(). The GIF_DEFER_DELETE flag has been superceded by the GLF_DEFER_DELETE flag, so fix a left-over comment. Add a clarifying comment to delete_work_func(). Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent 64c10ed commit 5b35158

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

fs/gfs2/glock.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -966,14 +966,14 @@ static struct gfs2_inode *gfs2_grab_existing_inode(struct gfs2_glock *gl)
966966
return ip;
967967
}
968968

969-
static void gfs2_try_evict(struct gfs2_glock *gl)
969+
static void gfs2_try_to_evict(struct gfs2_glock *gl)
970970
{
971971
struct gfs2_inode *ip;
972972

973973
/*
974974
* If there is contention on the iopen glock and we have an inode, try
975975
* to grab and release the inode so that it can be evicted. The
976-
* GIF_DEFER_DELETE flag indicates to gfs2_evict_inode() that the inode
976+
* GLF_DEFER_DELETE flag indicates to gfs2_evict_inode() that the inode
977977
* should not be deleted locally. This will allow the remote node to
978978
* go ahead and delete the inode without us having to do it, which will
979979
* avoid rgrp glock thrashing.
@@ -1026,8 +1026,14 @@ static void delete_work_func(struct work_struct *work)
10261026
struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
10271027
bool verify_delete = test_and_clear_bit(GLF_VERIFY_DELETE, &gl->gl_flags);
10281028

1029+
/*
1030+
* Check for the GLF_VERIFY_DELETE above: this ensures that we won't
1031+
* immediately process GLF_VERIFY_DELETE work that the below call to
1032+
* gfs2_try_to_evict() queues.
1033+
*/
1034+
10291035
if (test_and_clear_bit(GLF_TRY_TO_EVICT, &gl->gl_flags))
1030-
gfs2_try_evict(gl);
1036+
gfs2_try_to_evict(gl);
10311037

10321038
if (verify_delete) {
10331039
u64 no_addr = gl->gl_name.ln_number;

0 commit comments

Comments
 (0)