diff options
Diffstat (limited to 'fs/gfs2/glock.c')
| -rw-r--r-- | fs/gfs2/glock.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index 13391e546616..c962283d4e7f 100644 --- a/fs/gfs2/glock.c +++ b/fs/gfs2/glock.c | |||
| @@ -1265,6 +1265,8 @@ static void blocking_cb(struct gfs2_sbd *sdp, struct lm_lockname *name, | |||
| 1265 | holdtime = gl->gl_tchange + gl->gl_ops->go_min_hold_time; | 1265 | holdtime = gl->gl_tchange + gl->gl_ops->go_min_hold_time; |
| 1266 | if (time_before(now, holdtime)) | 1266 | if (time_before(now, holdtime)) |
| 1267 | delay = holdtime - now; | 1267 | delay = holdtime - now; |
| 1268 | if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags)) | ||
| 1269 | delay = gl->gl_ops->go_min_hold_time; | ||
| 1268 | 1270 | ||
| 1269 | spin_lock(&gl->gl_spin); | 1271 | spin_lock(&gl->gl_spin); |
| 1270 | handle_callback(gl, state, 1, delay); | 1272 | handle_callback(gl, state, 1, delay); |
| @@ -1578,8 +1580,6 @@ static const char *hflags2str(char *buf, unsigned flags, unsigned long iflags) | |||
| 1578 | *p++ = 'a'; | 1580 | *p++ = 'a'; |
| 1579 | if (flags & GL_EXACT) | 1581 | if (flags & GL_EXACT) |
| 1580 | *p++ = 'E'; | 1582 | *p++ = 'E'; |
| 1581 | if (flags & GL_ATIME) | ||
| 1582 | *p++ = 'a'; | ||
| 1583 | if (flags & GL_NOCACHE) | 1583 | if (flags & GL_NOCACHE) |
| 1584 | *p++ = 'c'; | 1584 | *p++ = 'c'; |
| 1585 | if (test_bit(HIF_HOLDER, &iflags)) | 1585 | if (test_bit(HIF_HOLDER, &iflags)) |
| @@ -1816,15 +1816,17 @@ restart: | |||
| 1816 | if (gl) { | 1816 | if (gl) { |
| 1817 | gi->gl = hlist_entry(gl->gl_list.next, | 1817 | gi->gl = hlist_entry(gl->gl_list.next, |
| 1818 | struct gfs2_glock, gl_list); | 1818 | struct gfs2_glock, gl_list); |
| 1819 | if (gi->gl) | 1819 | } else { |
| 1820 | gfs2_glock_hold(gi->gl); | 1820 | gi->gl = hlist_entry(gl_hash_table[gi->hash].hb_list.first, |
| 1821 | struct gfs2_glock, gl_list); | ||
| 1821 | } | 1822 | } |
| 1823 | if (gi->gl) | ||
| 1824 | gfs2_glock_hold(gi->gl); | ||
| 1822 | read_unlock(gl_lock_addr(gi->hash)); | 1825 | read_unlock(gl_lock_addr(gi->hash)); |
| 1823 | if (gl) | 1826 | if (gl) |
| 1824 | gfs2_glock_put(gl); | 1827 | gfs2_glock_put(gl); |
| 1825 | if (gl && gi->gl == NULL) | ||
| 1826 | gi->hash++; | ||
| 1827 | while (gi->gl == NULL) { | 1828 | while (gi->gl == NULL) { |
| 1829 | gi->hash++; | ||
| 1828 | if (gi->hash >= GFS2_GL_HASH_SIZE) | 1830 | if (gi->hash >= GFS2_GL_HASH_SIZE) |
| 1829 | return 1; | 1831 | return 1; |
| 1830 | read_lock(gl_lock_addr(gi->hash)); | 1832 | read_lock(gl_lock_addr(gi->hash)); |
| @@ -1833,7 +1835,6 @@ restart: | |||
| 1833 | if (gi->gl) | 1835 | if (gi->gl) |
| 1834 | gfs2_glock_hold(gi->gl); | 1836 | gfs2_glock_hold(gi->gl); |
| 1835 | read_unlock(gl_lock_addr(gi->hash)); | 1837 | read_unlock(gl_lock_addr(gi->hash)); |
| 1836 | gi->hash++; | ||
| 1837 | } | 1838 | } |
| 1838 | 1839 | ||
| 1839 | if (gi->sdp != gi->gl->gl_sbd) | 1840 | if (gi->sdp != gi->gl->gl_sbd) |
