]> git.baikalelectronics.ru Git - kernel.git/commit
fs/direct-io.c: keep dio_warn_stale_pagecache() when CONFIG_BLOCK=n
authorKonstantin Khlebnikov <khlebnikov@yandex-team.ru>
Sun, 1 Dec 2019 01:49:44 +0000 (17:49 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Dec 2019 14:29:18 +0000 (06:29 -0800)
commita3b509376419eee1a4269879589215db0b41c2b4
tree42fad039d35b3de85db3abd12458e1cc7cf18c35
parentc632153be41c56403d80a65feda1256b092681f7
fs/direct-io.c: keep dio_warn_stale_pagecache() when CONFIG_BLOCK=n

This helper prints warning if direct I/O write failed to invalidate cache,
and set EIO at inode to warn usersapce about possible data corruption.

See also commit bd0729ea7bec ("iomap: report collisions between directio
and buffered writes to userspace").

Direct I/O is supported by non-disk filesystems, for example NFS.  Thus
generic code needs this even in kernel without CONFIG_BLOCK.

Link: http://lkml.kernel.org/r/157270038074.4812.7980855544557488880.stgit@buzz
Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/direct-io.c
include/linux/fs.h
mm/filemap.c