From a55a47a3bc82cb53509ed2501697f9b385036195 Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Fri, 27 Nov 2020 14:23:04 +0100 Subject: Revert "GFS2: Prevent delete work from occurring on glocks used for create" Since commit a0e3cc65fa29 ("gfs2: Turn gl_delete into a delayed work"), we're cancelling any pending delete work of an iopen glock before attaching a new inode to that glock in gfs2_create_inode. This means that delete_work_func can no longer be queued or running when attaching the iopen glock to the new inode, and we can revert commit a4923865ea07 ("GFS2: Prevent delete work from occurring on glocks used for create"), which tried to achieve the same but in a racy way. Signed-off-by: Andreas Gruenbacher --- fs/gfs2/glock.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'fs/gfs2/glock.c') diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 35a6fd103761..d87a5bc3607b 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c @@ -857,12 +857,6 @@ static void delete_work_func(struct work_struct *work) clear_bit(GLF_PENDING_DELETE, &gl->gl_flags); spin_unlock(&gl->gl_lockref.lock); - /* If someone's using this glock to create a new dinode, the block must - have been freed by another node, then re-used, in which case our - iopen callback is too late after the fact. Ignore it. */ - if (test_bit(GLF_INODE_CREATING, &gl->gl_flags)) - goto out; - if (test_bit(GLF_DEMOTE, &gl->gl_flags)) { /* * If we can evict the inode, give the remote node trying to @@ -2112,8 +2106,6 @@ static const char *gflags2str(char *buf, const struct gfs2_glock *gl) *p++ = 'o'; if (test_bit(GLF_BLOCKING, gflags)) *p++ = 'b'; - if (test_bit(GLF_INODE_CREATING, gflags)) - *p++ = 'c'; if (test_bit(GLF_PENDING_DELETE, gflags)) *p++ = 'P'; if (test_bit(GLF_FREEING, gflags)) -- cgit v1.2.3