浏览代码

[GFS2] Fix gfs2_block_truncate_page err return

Code segment inside gfs2_block_truncate_page() doesn't set the return
code correctly. This causes NFSD erroneously returns EIO back to client
with setattr procedure call (truncate error).

Signed-off-by: S. Wendy Cheng <wcheng@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
S. Wendy Cheng 18 年之前
父节点
当前提交
1875f2f31b
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      fs/gfs2/bmap.c

+ 1 - 0
fs/gfs2/bmap.c

@@ -927,6 +927,7 @@ static int gfs2_block_truncate_page(struct address_space *mapping)
 		/* Uhhuh. Read error. Complain and punt. */
 		/* Uhhuh. Read error. Complain and punt. */
 		if (!buffer_uptodate(bh))
 		if (!buffer_uptodate(bh))
 			goto unlock;
 			goto unlock;
+		err = 0;
 	}
 	}
 
 
 	if (sdp->sd_args.ar_data == GFS2_DATA_ORDERED || gfs2_is_jdata(ip))
 	if (sdp->sd_args.ar_data == GFS2_DATA_ORDERED || gfs2_is_jdata(ip))