[Ocfs2-devel] [PATCH] ocfs2: adds mlog_errno to aops.c
Joel Becker
Joel.Becker at oracle.com
Fri Sep 4 16:11:42 PDT 2009
On Fri, Sep 04, 2009 at 10:48:38AM +0800, Wengang Wang wrote:
> when an error is hit, printing the error number is helpful.
> this patch adds prints in such cases in aops.c.
>
> Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com>
> ---
> fs/ocfs2/aops.c | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
> index b2c52b3..04e0760 100644
> --- a/fs/ocfs2/aops.c
> +++ b/fs/ocfs2/aops.c
> @@ -349,8 +349,10 @@ static int ocfs2_readpages(struct file *filp, struct address_space *mapping,
> * lock inversion, but don't bother with retrying.
> */
> ret = ocfs2_inode_lock_full(inode, NULL, 0, OCFS2_LOCK_NONBLOCK);
> - if (ret)
> + if (ret) {
> + mlog_errno(ret);
> return err;
> + }
Make sure that you don't print EAGAIN.
Joel
--
Life's Little Instruction Book #232
"Keep your promises."
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127
More information about the Ocfs2-devel
mailing list