cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] GFS2: fix code parameter error in inode_go_lock
  2017-07-21 18:27 [Cluster-devel] [PATCH] GFS2: fix code parameter error in inode_go_lock Wang Xibo
@ 2017-07-21 13:25 ` Bob Peterson
  0 siblings, 0 replies; 2+ messages in thread
From: Bob Peterson @ 2017-07-21 13:25 UTC (permalink / raw)
  To: cluster-devel.redhat.com

----- Original Message -----
| 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<wang.xibo@zte.com.cn>
| Signed-off-by: Xiao Likun<xiao.likun@zte.com.cn>
| ---
|  fs/gfs2/glops.c | 2 +-
|  1 file changed, 1 insertion(+), 1 deletion(-)
| 
| diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
| index 5e69636..28c203a 100644
| --- a/fs/gfs2/glops.c
| +++ b/fs/gfs2/glops.c
| @@ -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;
| --
| 1.8.3.1
| 
| 
| 
Hi,

Good catch! This is now applied to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=e7cb550d79fba5876616ed33ccafafc4e2bd7e2e

Regards,

Bob Peterson
Red Hat File Systems



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Cluster-devel] [PATCH] GFS2: fix code parameter error in inode_go_lock
@ 2017-07-21 18:27 Wang Xibo
  2017-07-21 13:25 ` Bob Peterson
  0 siblings, 1 reply; 2+ messages in thread
From: Wang Xibo @ 2017-07-21 18:27 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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<wang.xibo@zte.com.cn>
Signed-off-by: Xiao Likun<xiao.likun@zte.com.cn>
---
 fs/gfs2/glops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 5e69636..28c203a 100644
--- a/fs/gfs2/glops.c
+++ b/fs/gfs2/glops.c
@@ -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;
-- 
1.8.3.1




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-07-21 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-21 18:27 [Cluster-devel] [PATCH] GFS2: fix code parameter error in inode_go_lock Wang Xibo
2017-07-21 13:25 ` Bob Peterson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).