diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-02 05:57:03 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2022-04-02 05:57:03 +0300 |
commit | 88e6c0207623874922712e162e25d9dafd39661e (patch) | |
tree | d12cebdbb22ba1deff3d664543e87b45d821646e /fs/kernfs/file.c | |
parent | a4251ab9896cefd75926b11c45aa477f8464cdec (diff) | |
parent | 61e02cdb6ac68a84f1bb95026632d63677f26202 (diff) | |
download | linux-88e6c0207623874922712e162e25d9dafd39661e.tar.xz |
Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro:
"Assorted bits and pieces"
* 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
aio: drop needless assignment in aio_read()
clean overflow checks in count_mounts() a bit
seq_file: fix NULL pointer arithmetic warning
uml/x86: use x86 load_unaligned_zeropad()
asm/user.h: killed unused macros
constify struct path argument of finish_automount()/do_add_mount()
fs: Remove FIXME comment in generic_write_checks()
Diffstat (limited to 'fs/kernfs/file.c')
-rw-r--r-- | fs/kernfs/file.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/kernfs/file.c b/fs/kernfs/file.c index 74067a73ff78..88423069407c 100644 --- a/fs/kernfs/file.c +++ b/fs/kernfs/file.c @@ -120,13 +120,8 @@ static void *kernfs_seq_start(struct seq_file *sf, loff_t *ppos) if (next == ERR_PTR(-ENODEV)) kernfs_seq_stop_active(sf, next); return next; - } else { - /* - * The same behavior and code as single_open(). Returns - * !NULL if pos is at the beginning; otherwise, NULL. - */ - return NULL + !*ppos; } + return single_start(sf, ppos); } static void *kernfs_seq_next(struct seq_file *sf, void *v, loff_t *ppos) |