[GFS2] Fix gfs2_block_truncate_page err return
authorS. Wendy Cheng <wcheng@redhat.com>
Tue, 26 Jun 2007 01:14:31 +0000 (21:14 -0400)
committerSteven Whitehouse <swhiteho@redhat.com>
Mon, 9 Jul 2007 07:23:54 +0000 (08:23 +0100)
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>
fs/gfs2/bmap.c

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