summaryrefslogtreecommitdiffstats
path: root/fs/read_write.c
diff options
context:
space:
mode:
authorAmir Goldstein2017-01-31 09:34:55 +0100
committerMiklos Szeredi2017-02-07 15:05:04 +0100
commit9e79b1326302589a035fe20e8cce7c1a7d8333ed (patch)
tree80ba2823440ee9f7915b40c43d211e9e0be71d8c /fs/read_write.c
parentvfs: create vfs helper vfs_tmpfile() (diff)
downloadkernel-qcow2-linux-9e79b1326302589a035fe20e8cce7c1a7d8333ed.tar.gz
kernel-qcow2-linux-9e79b1326302589a035fe20e8cce7c1a7d8333ed.tar.xz
kernel-qcow2-linux-9e79b1326302589a035fe20e8cce7c1a7d8333ed.zip
vfs: deny fallocate() on directory
There was an obscure use case of fallocate of directory inode in the vfs helper with the comment: "Let individual file system decide if it supports preallocation for directories or not." But there is no in-tree file system that implements fallocate for directory operations. Deny an attempt to fallocate a directory with EISDIR error. This change is needed prior to converting sb_start_write() to file_start_write(), so freeze protection is correctly handled for cases of fallocate file and blockdev. Cc: linux-api@vger.kernel.org Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/read_write.c')
0 files changed, 0 insertions, 0 deletions