* [PATCH] xfs: Use generic_file_open()
@ 2022-04-09 15:52 Matthew Wilcox (Oracle)
2022-04-11 2:10 ` Dave Chinner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Matthew Wilcox (Oracle) @ 2022-04-09 15:52 UTC (permalink / raw)
To: linux-xfs; +Cc: Matthew Wilcox (Oracle)
Remove the open-coded check of O_LARGEFILE. This changes the errno
to be the same as other filesystems; it was changed generically in
2.6.24 but that fix skipped XFS.
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
fs/xfs/xfs_file.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 5bddb1e9e0b3..c5541d062d0d 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -1167,12 +1167,10 @@ xfs_file_open(
struct inode *inode,
struct file *file)
{
- if (!(file->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS)
- return -EFBIG;
if (xfs_is_shutdown(XFS_M(inode->i_sb)))
return -EIO;
file->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC;
- return 0;
+ return generic_file_open(inode, file);
}
STATIC int
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs: Use generic_file_open()
2022-04-09 15:52 [PATCH] xfs: Use generic_file_open() Matthew Wilcox (Oracle)
@ 2022-04-11 2:10 ` Dave Chinner
2022-04-12 4:45 ` Christoph Hellwig
2022-04-12 17:06 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Dave Chinner @ 2022-04-11 2:10 UTC (permalink / raw)
To: Matthew Wilcox (Oracle); +Cc: linux-xfs
On Sat, Apr 09, 2022 at 04:52:20PM +0100, Matthew Wilcox (Oracle) wrote:
> Remove the open-coded check of O_LARGEFILE. This changes the errno
> to be the same as other filesystems; it was changed generically in
> 2.6.24 but that fix skipped XFS.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Looks good.
Reviewed-by: Dave Chinner <dchinner@redhat.com>
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs: Use generic_file_open()
2022-04-09 15:52 [PATCH] xfs: Use generic_file_open() Matthew Wilcox (Oracle)
2022-04-11 2:10 ` Dave Chinner
@ 2022-04-12 4:45 ` Christoph Hellwig
2022-04-12 17:06 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2022-04-12 4:45 UTC (permalink / raw)
To: Matthew Wilcox (Oracle); +Cc: linux-xfs
On Sat, Apr 09, 2022 at 04:52:20PM +0100, Matthew Wilcox (Oracle) wrote:
> Remove the open-coded check of O_LARGEFILE. This changes the errno
> to be the same as other filesystems; it was changed generically in
> 2.6.24 but that fix skipped XFS.
Probably because XFS still was a mess with a bunch of layers then..
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs: Use generic_file_open()
2022-04-09 15:52 [PATCH] xfs: Use generic_file_open() Matthew Wilcox (Oracle)
2022-04-11 2:10 ` Dave Chinner
2022-04-12 4:45 ` Christoph Hellwig
@ 2022-04-12 17:06 ` Darrick J. Wong
2 siblings, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2022-04-12 17:06 UTC (permalink / raw)
To: Matthew Wilcox (Oracle); +Cc: linux-xfs
On Sat, Apr 09, 2022 at 04:52:20PM +0100, Matthew Wilcox (Oracle) wrote:
> Remove the open-coded check of O_LARGEFILE. This changes the errno
> to be the same as other filesystems; it was changed generically in
> 2.6.24 but that fix skipped XFS.
>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
LGTM,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> fs/xfs/xfs_file.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> index 5bddb1e9e0b3..c5541d062d0d 100644
> --- a/fs/xfs/xfs_file.c
> +++ b/fs/xfs/xfs_file.c
> @@ -1167,12 +1167,10 @@ xfs_file_open(
> struct inode *inode,
> struct file *file)
> {
> - if (!(file->f_flags & O_LARGEFILE) && i_size_read(inode) > MAX_NON_LFS)
> - return -EFBIG;
> if (xfs_is_shutdown(XFS_M(inode->i_sb)))
> return -EIO;
> file->f_mode |= FMODE_NOWAIT | FMODE_BUF_RASYNC;
> - return 0;
> + return generic_file_open(inode, file);
> }
>
> STATIC int
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-12 17:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-09 15:52 [PATCH] xfs: Use generic_file_open() Matthew Wilcox (Oracle)
2022-04-11 2:10 ` Dave Chinner
2022-04-12 4:45 ` Christoph Hellwig
2022-04-12 17:06 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox