| To: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 004/119] xfs: enable buffer deadlock postmortem diagnosis via ftrace |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Fri, 17 Jun 2016 04:34:23 -0700 |
| Cc: | david@xxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, vishal.l.verma@xxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <146612629822.12839.7938642541078923297.stgit@xxxxxxxxxxxxxxxx> |
| References: | <146612627129.12839.3827886950949809165.stgit@xxxxxxxxxxxxxxxx> <146612629822.12839.7938642541078923297.stgit@xxxxxxxxxxxxxxxx> |
| User-agent: | Mutt/1.5.24 (2015-08-30) |
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index efa2a73..2333db7 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -947,7 +947,8 @@ xfs_buf_trylock(
> if (locked)
> XB_SET_OWNER(bp);
>
> - trace_xfs_buf_trylock(bp, _RET_IP_);
> + locked ? trace_xfs_buf_trylock(bp, _RET_IP_) :
> + trace_xfs_buf_trylock_fail(bp, _RET_IP_);
> return locked;
I think this should be something like:
if (locked) {
XB_SET_OWNER(bp);
trace_xfs_buf_trylock(bp, _RET_IP_);
} else {
trace_xfs_buf_trylock_fail(bp, _RET_IP_);
}
otherwise this looks good and can go in without the rest of the series.
|
| Previous by Date: | Re: [PATCH 003/119] xfs: check offsets of variable length structures, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH 005/119] xfs: check for a valid error_tag in errortag_add, Christoph Hellwig |
| Previous by Thread: | [PATCH 004/119] xfs: enable buffer deadlock postmortem diagnosis via ftrace, Darrick J. Wong |
| Next by Thread: | Re: [PATCH 004/119] xfs: enable buffer deadlock postmortem diagnosis via ftrace, Dave Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |