lkml.org 
[lkml]   [2020]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] dlmfs: convert dlmfs_file_read() to copy_to_user()
On Thu, May 28, 2020 at 6:47 PM Al Viro <viro@zeniv.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

\
 
 \ /
  Last update: 2020-05-29 03:54    [W:0.227 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site