Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234040
b: refs/heads/master
c: 1ca551c
h: refs/heads/master
v: v3
  • Loading branch information
Marco Stornelli authored and Al Viro committed Mar 10, 2011
1 parent 9793d90 commit 0ff5ea0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 991ac30d8b30ab6051dff5a7b07d84e6f5efa3a6
refs/heads/master: 1ca551c6caae7b52178555cdedea6ca26444be46
8 changes: 8 additions & 0 deletions trunk/fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 0ff5ea0

Please sign in to comment.