Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'gfs2-v6.8-rc2-revert' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2

Pull gfs2 revert from Andreas Gruenbacher:
"It turns out that the commit to use GL_NOBLOCK flag for non-blocking
lookups has several issues, and not all of them have a simple fix"

* tag 'gfs2-v6.8-rc2-revert' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2:
Revert "gfs2: Use GL_NOBLOCK flag for non-blocking lookups"

+13 -18
+9 -14
fs/gfs2/dentry.c
··· 32 32 33 33 static int gfs2_drevalidate(struct dentry *dentry, unsigned int flags) 34 34 { 35 - struct dentry *parent = NULL; 35 + struct dentry *parent; 36 36 struct gfs2_sbd *sdp; 37 37 struct gfs2_inode *dip; 38 - struct inode *dinode, *inode; 38 + struct inode *inode; 39 39 struct gfs2_holder d_gh; 40 40 struct gfs2_inode *ip = NULL; 41 41 int error, valid = 0; 42 42 int had_lock = 0; 43 43 44 - if (flags & LOOKUP_RCU) { 45 - dinode = d_inode_rcu(READ_ONCE(dentry->d_parent)); 46 - if (!dinode) 47 - return -ECHILD; 48 - } else { 49 - parent = dget_parent(dentry); 50 - dinode = d_inode(parent); 51 - } 52 - sdp = GFS2_SB(dinode); 53 - dip = GFS2_I(dinode); 44 + if (flags & LOOKUP_RCU) 45 + return -ECHILD; 46 + 47 + parent = dget_parent(dentry); 48 + sdp = GFS2_SB(d_inode(parent)); 49 + dip = GFS2_I(d_inode(parent)); 54 50 inode = d_inode(dentry); 55 51 56 52 if (inode) { ··· 62 66 63 67 had_lock = (gfs2_glock_is_locked_by_me(dip->i_gl) != NULL); 64 68 if (!had_lock) { 65 - error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 66 - flags & LOOKUP_RCU ? GL_NOBLOCK : 0, &d_gh); 69 + error = gfs2_glock_nq_init(dip->i_gl, LM_ST_SHARED, 0, &d_gh); 67 70 if (error) 68 71 goto out; 69 72 }
+4 -4
fs/gfs2/inode.c
··· 1882 1882 WARN_ON_ONCE(!may_not_block); 1883 1883 return -ECHILD; 1884 1884 } 1885 - if (gfs2_glock_is_locked_by_me(ip->i_gl) == NULL) { 1886 - int noblock = may_not_block ? GL_NOBLOCK : 0; 1887 - error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 1888 - LM_FLAG_ANY | noblock, &i_gh); 1885 + if (gfs2_glock_is_locked_by_me(gl) == NULL) { 1886 + if (may_not_block) 1887 + return -ECHILD; 1888 + error = gfs2_glock_nq_init(gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh); 1889 1889 if (error) 1890 1890 return error; 1891 1891 }