[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHk-=wiBqa6dZ0Sw0DvHjnCp727+0RAwnNCyA=ur_gAE4C05fg@mail.gmail.com>
Date: Thu, 28 May 2020 18:54:11 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>
Subject: Re: [PATCH 2/2] dlmfs: convert dlmfs_file_read() to copy_to_user()
On Thu, May 28, 2020 at 6:47 PM Al Viro <viro@...iv.linux.org.uk> wrote:
>
> case S_IFREG:
> inode->i_op = &dlmfs_file_inode_operations;
> inode->i_fop = &dlmfs_file_operations;
>
> i_size_write(inode, DLM_LVB_LEN);
> is the only thing that does anything to size of that sucker. IOW, that
> i_size_read() might as well had been an explicit 64.
Heh. Indeed. I did actually grep for i_size_write() use in ocfs2 and
saw several. But I didn't realize to limit it to just the dlmfs part.
So it does that crazy sequence number lock dance on 32-bit just to
read a constant value.
Oh well.
It would be nice to get those follow-up cleanups eventually, but I
guess the general user access cleanups are more important than this
very odd special case silliness.
Linus
Powered by blists - more mailing lists