* [PATCH] fs: Remove FIXME comment in generic_write_checks()
@ 2021-12-31 7:57 Tal Zussman
2022-01-30 19:35 ` Al Viro
0 siblings, 1 reply; 2+ messages in thread
From: Tal Zussman @ 2021-12-31 7:57 UTC (permalink / raw)
To: Alexander Viro, open list:FILESYSTEMS (VFS and infrastructure),
open list, tz2294, Xijiao Li, Hans Montero, Theodore Ts'o,
OS-TA
This patch removes an unnecessary comment that had to do with block special
files from `generic_write_checks()`.
The comment, originally added in Linux v2.4.14.9, was to clarify that we only
set `pos` to the file size when the file was opened with `O_APPEND` if the file
wasn't a block special file. Prior to Linux v2.4, block special files had a
different `write()` function which was unified into a generic `write()` function
in Linux v2.4. This generic `write()` function called `generic_write_checks()`.
For more details, see this earlier conversation:
https://lore.kernel.org/linux-fsdevel/Yc4Czk5A+p5p2Y4W@mit.edu/
Currently, block special devices have their own `write_iter()` function and no
longer share the same `generic_write_checks()`, therefore rendering the comment
irrelevant.
Signed-off-by: Tal Zussman <tz2294@columbia.edu>
Co-authored-by: Xijiao Li <xl2950@columbia.edu>
Co-authored-by: Hans Montero <hjm2133@columbia.edu>
Suggested-by: Theodore Ts'o <tytso@mit.edu>
---
fs/read_write.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fs/read_write.c b/fs/read_write.c
index 0074afa7ecb3..0173dc7183c9 100644
--- a/fs/read_write.c
+++ b/fs/read_write.c
@@ -1637,7 +1637,6 @@ ssize_t generic_write_checks(struct kiocb *iocb, struct iov_iter *from)
if (!iov_iter_count(from))
return 0;
- /* FIXME: this is for backwards compatibility with 2.4 */
if (iocb->ki_flags & IOCB_APPEND)
iocb->ki_pos = i_size_read(inode);
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] fs: Remove FIXME comment in generic_write_checks()
2021-12-31 7:57 [PATCH] fs: Remove FIXME comment in generic_write_checks() Tal Zussman
@ 2022-01-30 19:35 ` Al Viro
0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2022-01-30 19:35 UTC (permalink / raw)
To: Tal Zussman
Cc: open list:FILESYSTEMS (VFS and infrastructure),
open list, Xijiao Li, Hans Montero, Theodore Ts'o, OS-TA
On Fri, Dec 31, 2021 at 02:57:50AM -0500, Tal Zussman wrote:
> This patch removes an unnecessary comment that had to do with block special
> files from `generic_write_checks()`.
>
> The comment, originally added in Linux v2.4.14.9, was to clarify that we only
> set `pos` to the file size when the file was opened with `O_APPEND` if the file
> wasn't a block special file. Prior to Linux v2.4, block special files had a
> different `write()` function which was unified into a generic `write()` function
> in Linux v2.4. This generic `write()` function called `generic_write_checks()`.
> For more details, see this earlier conversation:
> https://lore.kernel.org/linux-fsdevel/Yc4Czk5A+p5p2Y4W@mit.edu/
>
> Currently, block special devices have their own `write_iter()` function and no
> longer share the same `generic_write_checks()`, therefore rendering the comment
> irrelevant.
Applied
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-30 19:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-31 7:57 [PATCH] fs: Remove FIXME comment in generic_write_checks() Tal Zussman
2022-01-30 19:35 ` Al Viro
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.