From: Matthew Wilcox <willy@infradead.org>
To: Ritesh Harjani <riteshh@linux.ibm.com>
Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org,
Alexander Viro <viro@zeniv.linux.org.uk>,
"Darrick J . Wong" <darrick.wong@oracle.com>,
Christoph Hellwig <hch@infradead.org>, Jan Kara <jack@suse.com>,
tytso@mit.edu, "Aneesh Kumar K . V" <aneesh.kumar@linux.ibm.com>,
linux-ext4@vger.kernel.org, Jan Kara <jack@suse.cz>,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCHv2] fibmap: Warn and return an error in case of block > INT_MAX
Date: Tue, 28 Apr 2020 04:41:41 -0700 [thread overview]
Message-ID: <20200428114141.GL29705@bombadil.infradead.org> (raw)
In-Reply-To: <58f0c64a3f2dbd363fb93371435f6bcaeeb7abe4.1588058868.git.riteshh@linux.ibm.com>
On Tue, Apr 28, 2020 at 01:08:31PM +0530, Ritesh Harjani wrote:
> @@ -71,6 +72,13 @@ static int ioctl_fibmap(struct file *filp, int __user *p)
> block = ur_block;
> error = bmap(inode, &block);
>
> + if (block > INT_MAX) {
> + error = -ERANGE;
> + pr_warn_ratelimited("[%s/%d] FS (%s): would truncate fibmap result\n",
> + current->comm, task_pid_nr(current),
> + sb->s_id);
Why is it useful to print the pid?
And why print the superblock when we could print the filename instead?
We have a struct file, so we can printk("%pD4", filp) to print the
last four components of the pathname.
next prev parent reply other threads:[~2020-04-28 11:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-28 7:38 [PATCHv2] fibmap: Warn and return an error in case of block > INT_MAX Ritesh Harjani
2020-04-28 7:47 ` Christoph Hellwig
2020-04-28 11:41 ` Matthew Wilcox [this message]
2020-04-29 8:30 ` Ritesh Harjani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200428114141.GL29705@bombadil.infradead.org \
--to=willy@infradead.org \
--cc=aneesh.kumar@linux.ibm.com \
--cc=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=jack@suse.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-xfs@vger.kernel.org \
--cc=riteshh@linux.ibm.com \
--cc=tytso@mit.edu \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox