linux-IllusionX/fs
Ivan Vecera ba87977a49 kernfs: fix regression in kernfs_fop_write caused by wrong type
Commit b7ce40cff0 ("kernfs: cache atomic_write_len in
kernfs_open_file") changes type of local variable 'len' from ssize_t
to size_t. This change caused that the *ppos value is updated also
when the previous write callback failed.

Mentioned snippet:
...
len = ops->write(...); <- return value can be negative
...
if (len > 0)           <- true here in this case
        *ppos += len;
...

Fixes: b7ce40cff0 ("kernfs: cache atomic_write_len in kernfs_open_file")
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2018-01-19 12:19:13 -05:00
..
9p Merge branch '9p-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-22 20:17:54 -10:00
adfs
affs
afs afs: remove redundant assignment of dvnode to itself 2017-11-24 13:55:46 +00:00
autofs4 autofs: don't fail mount for transient error 2017-11-17 16:10:02 -08:00
befs
bfs
btrfs
cachefiles
ceph We have a set of file locking improvements from Zheng, rbd rw/ro 2017-11-21 05:38:32 -10:00
cifs
coda Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 12:54:01 -08:00
configfs
cramfs Merge branch 'work.cramfs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 13:20:41 -08:00
crypto
debugfs
devpts
dlm
ecryptfs * Miscellaneous code cleanups and refactoring 2017-11-17 14:16:21 -08:00
efivarfs
efs
exofs
exportfs
ext2 libnvdimm for 4.15 2017-11-17 09:51:57 -08:00
ext4 Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 11:54:55 -08:00
f2fs
fat fat: remove redundant assignment of 0 to slots 2017-11-17 16:10:03 -08:00
freevxfs
fscache
fuse
gfs2
hfs hfs/hfsplus: clean up unused variables in bnode.c 2017-11-17 16:10:03 -08:00
hfsplus hfs/hfsplus: clean up unused variables in bnode.c 2017-11-17 16:10:03 -08:00
hostfs
hpfs
hugetlbfs
isofs
jbd2 libnvdimm for 4.15 2017-11-17 09:51:57 -08:00
jffs2
jfs
kernfs kernfs: fix regression in kernfs_fop_write caused by wrong type 2018-01-19 12:19:13 -05:00
lockd Lots of good bugfixes, including: 2017-11-18 11:22:04 -08:00
minix
ncpfs
nfs NFS client updates for Linux 4.15 2017-11-17 14:18:00 -08:00
nfs_common
nfsd Lots of good bugfixes, including: 2017-11-18 11:22:04 -08:00
nilfs2 nilfs2: remove inode->i_version initialization 2017-11-17 16:10:03 -08:00
nls
notify
ntfs
ocfs2 treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
omfs
openpromfs
orangefs 3 Cleanups: remove initialization of i_version - Jeff Layton 2017-11-21 05:40:48 -10:00
overlayfs Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs 2017-11-17 13:36:59 -08:00
proc Merge branch 'work.whack-a-mole' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-22 20:20:02 -10:00
pstore treewide: Switch DEFINE_TIMER callbacks to struct timer_list * 2017-11-21 15:57:05 -08:00
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs
ubifs
udf
ufs
xfs Changes since last update: 2017-11-22 20:42:42 -10:00
aio.c Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 11:54:55 -08:00
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf.c
binfmt_elf_fdpic.c Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 12:54:01 -08:00
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c
buffer.c
char_dev.c
compat.c
compat_binfmt_elf.c
compat_ioctl.c Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 12:54:01 -08:00
coredump.c Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 11:54:55 -08:00
dax.c libnvdimm for 4.15 2017-11-17 09:51:57 -08:00
dcache.c
dcookies.c
direct-io.c
drop_caches.c
eventfd.c
eventpoll.c Merge branch 'akpm' (patches from Andrew) 2017-11-17 16:56:17 -08:00
exec.c
fcntl.c
fhandle.c Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 12:54:01 -08:00
file.c Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 12:54:01 -08:00
file_table.c
filesystems.c
fs-writeback.c
fs_pin.c
fs_struct.c
inode.c
internal.h
ioctl.c
iomap.c Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 12:08:18 -08:00
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c
mount.h
mpage.c
namei.c Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 12:54:01 -08:00
namespace.c VFS: Handle lazytime in do_mount() 2017-12-09 20:16:33 -05:00
no-block.c
nsfs.c
open.c
pipe.c pipe: add proc_dopipe_max_size() to safely assign pipe_max_size 2017-11-17 16:10:03 -08:00
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c Merge branch 'work.iov_iter' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 12:08:18 -08:00
readdir.c
select.c Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 11:54:55 -08:00
seq_file.c
signalfd.c Merge branch 'misc.compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 11:54:55 -08:00
splice.c
stack.c
stat.c
statfs.c Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2017-11-17 12:54:01 -08:00
super.c sget(): handle failures of register_shrinker() 2017-12-18 15:05:07 -05:00
sync.c
timerfd.c
userfaultfd.c
utimes.c
xattr.c