Skip to content

Commit

Permalink
GFS2: fix code parameter error in inode_go_lock
Browse files Browse the repository at this point in the history
In inode_go_lock() function, the parameter order of list_add() is error.
According to the define of list_add(), the first parameter is new entry
and the second is the list head, so ip->i_trunc_list should be the
first parameter and the sdp->sd_trunc_list should be second.

Signed-off-by: Wang Xibo<[email protected]>
Signed-off-by: Xiao Likun<[email protected]>
Signed-off-by: Bob Peterson <[email protected]>
  • Loading branch information
Wang Xibo authored and AstralBob committed Jul 21, 2017
1 parent 98e5a91 commit e7cb550
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/gfs2/glops.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ static int inode_go_lock(struct gfs2_holder *gh)
(gh->gh_state == LM_ST_EXCLUSIVE)) {
spin_lock(&sdp->sd_trunc_lock);
if (list_empty(&ip->i_trunc_list))
list_add(&sdp->sd_trunc_list, &ip->i_trunc_list);
list_add(&ip->i_trunc_list, &sdp->sd_trunc_list);
spin_unlock(&sdp->sd_trunc_lock);
wake_up(&sdp->sd_quota_wait);
return 1;
Expand Down

0 comments on commit e7cb550

Please sign in to comment.