Skip to content

Commit

Permalink
ocfs2: log the actual return value of ocfs2_file_aio_write()
Browse files Browse the repository at this point in the history
in ocfs2_file_aio_write(), log_exit() could don't log the value
which is really returned. this patch fixes it.

Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
  • Loading branch information
Wengang Wang authored and Joel Becker committed Jul 10, 2009
1 parent 17ae26b commit 812e7a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1918,8 +1918,10 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb,

mutex_unlock(&inode->i_mutex);

if (written)
ret = written;
mlog_exit(ret);
return written ? written : ret;
return ret;
}

static int ocfs2_splice_to_file(struct pipe_inode_info *pipe,
Expand Down

0 comments on commit 812e7a6

Please sign in to comment.