diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-08 09:55:03 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-07-08 09:27:56 +0300 |
commit | a01ac27be4729f80176a45c54611b768dfbdc840 (patch) | |
tree | a16940d89cd9a69f4119cd29fc80f4e0018fd2ec /fs/binfmt_aout.c | |
parent | 9db97752244919c604eb21df7ef2da3bf58aec73 (diff) | |
download | linux-a01ac27be4729f80176a45c54611b768dfbdc840.tar.xz |
fs: check FMODE_WRITE in __kernel_write
Add a WARN_ON_ONCE if the file isn't actually open for write. This
matches the check done in vfs_write, but actually warn warns as a
kernel user calling write on a file not opened for writing is a pretty
obvious programming error.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/binfmt_aout.c')
0 files changed, 0 insertions, 0 deletions