Skip to content

Commit 4776b7c

Browse files
committed
gfs2: make timeout values more explicit
jira LE-2169 Rebuild_History Non-Buildable kernel-4.18.0-553.27.1.el8_10 commit-author Wolfram Sang <[email protected]> commit c1c53c2 '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]> (cherry picked from commit c1c53c2) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 1f85f39 commit 4776b7c

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
@@ -1291,7 +1291,6 @@ static bool gfs2_upgrade_iopen_glock(struct inode *inode)
12911291
struct gfs2_inode *ip = GFS2_I(inode);
12921292
struct gfs2_sbd *sdp = GFS2_SB(inode);
12931293
struct gfs2_holder *gh = &ip->i_iopen_gh;
1294-
long timeout = 5 * HZ;
12951294
int error;
12961295

12971296
gh->gh_flags |= GL_NOCACHE;
@@ -1322,10 +1321,10 @@ static bool gfs2_upgrade_iopen_glock(struct inode *inode)
13221321
if (error)
13231322
return false;
13241323

1325-
timeout = wait_event_interruptible_timeout(sdp->sd_async_glock_wait,
1324+
wait_event_interruptible_timeout(sdp->sd_async_glock_wait,
13261325
!test_bit(HIF_WAIT, &gh->gh_iflags) ||
13271326
test_bit(GLF_DEMOTE, &ip->i_gl->gl_flags),
1328-
timeout);
1327+
5 * HZ);
13291328
if (!test_bit(HIF_HOLDER, &gh->gh_iflags)) {
13301329
gfs2_glock_dq(gh);
13311330
return false;

0 commit comments

Comments
 (0)