diff options
author | David S. Miller <davem@davemloft.net> | 2011-03-10 14:00:44 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-10 14:00:44 -0800 |
commit | bef6e7e76868ab454d5e83635a4a7a1961c74fb5 (patch) | |
tree | 1a7417b9dde942cc71f87c02688c6ac6b0e57a72 /fs/open.c | |
parent | dcbcdf22f500ac6e4ec06485341024739b9dc241 (diff) | |
parent | 9179746652faf0aba07b8b7f770dcf29892a24c6 (diff) | |
download | kernel_samsung_aries-bef6e7e76868ab454d5e83635a4a7a1961c74fb5.zip kernel_samsung_aries-bef6e7e76868ab454d5e83635a4a7a1961c74fb5.tar.gz kernel_samsung_aries-bef6e7e76868ab454d5e83635a4a7a1961c74fb5.tar.bz2 |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -233,6 +233,14 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len) if (!(file->f_mode & FMODE_WRITE)) return -EBADF; + + /* It's not possible punch hole on append only file */ + if (mode & FALLOC_FL_PUNCH_HOLE && IS_APPEND(inode)) + return -EPERM; + + if (IS_IMMUTABLE(inode)) + return -EPERM; + /* * Revalidate the write permissions, in case security policy has * changed since the files were opened. |