Skip to content

Commit c1c53c2

Browse files
Wolfram SangAndreas Gruenbacher
authored andcommitted
gfs2: make timeout values more explicit
'timeout' is a vague name for the return value of wait_event_*_timeout because it actually returns the time left. Because the variable is never used later, just drop the return value. Since variable 'timeout' is then only used to carry a fixed timeout value, drop this in favor of a fixed function argument as in the other call to wait_event_timeout() above. Signed-off-by: Wolfram Sang <[email protected]> Signed-off-by: Andreas Gruenbacher <[email protected]>
1 parent 50fabd4 commit c1c53c2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

fs/gfs2/super.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,6 @@ static bool gfs2_upgrade_iopen_glock(struct inode *inode)
12621262
struct gfs2_inode *ip = GFS2_I(inode);
12631263
struct gfs2_sbd *sdp = GFS2_SB(inode);
12641264
struct gfs2_holder *gh = &ip->i_iopen_gh;
1265-
long timeout = 5 * HZ;
12661265
int error;
12671266

12681267
gh->gh_flags |= GL_NOCACHE;
@@ -1293,10 +1292,10 @@ static bool gfs2_upgrade_iopen_glock(struct inode *inode)
12931292
if (error)
12941293
return false;
12951294

1296-
timeout = wait_event_interruptible_timeout(sdp->sd_async_glock_wait,
1295+
wait_event_interruptible_timeout(sdp->sd_async_glock_wait,
12971296
!test_bit(HIF_WAIT, &gh->gh_iflags) ||
12981297
test_bit(GLF_DEMOTE, &ip->i_gl->gl_flags),
1299-
timeout);
1298+
5 * HZ);
13001299
if (!test_bit(HIF_HOLDER, &gh->gh_iflags)) {
13011300
gfs2_glock_dq(gh);
13021301
return false;

0 commit comments

Comments
 (0)