projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7736e8c
)
fuse: check fallocate mode
author
Miklos Szeredi
<mszeredi@suse.cz>
Mon, 28 Apr 2014 12:19:21 +0000
(14:19 +0200)
committer
Miklos Szeredi
<mszeredi@suse.cz>
Mon, 28 Apr 2014 12:19:21 +0000
(14:19 +0200)
Don't allow new fallocate modes until we figure out what (if anything) that
takes.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
fs/fuse/file.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/fuse/file.c
b/fs/fuse/file.c
index 13f8bdec5110d1a7db12b2a262bb5e2ecb0e4f82..982288a1c6ab1b84c59aeb306a7e57a832061292 100644
(file)
--- a/
fs/fuse/file.c
+++ b/
fs/fuse/file.c
@@
-2972,6
+2972,9
@@
static long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
bool lock_inode = !(mode & FALLOC_FL_KEEP_SIZE) ||
(mode & FALLOC_FL_PUNCH_HOLE);
+ if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
+ return -EOPNOTSUPP;
+
if (fc->no_fallocate)
return -EOPNOTSUPP;