aboutsummaryrefslogtreecommitdiffstats
path: root/mm/shmem.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/shmem.c')
-rw-r--r--mm/shmem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index f484c276e994..91b912b37b8c 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1724,6 +1724,9 @@ static long shmem_fallocate(struct file *file, int mode, loff_t offset,
1724 pgoff_t start, index, end; 1724 pgoff_t start, index, end;
1725 int error; 1725 int error;
1726 1726
1727 if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
1728 return -EOPNOTSUPP;
1729
1727 mutex_lock(&inode->i_mutex); 1730 mutex_lock(&inode->i_mutex);
1728 1731
1729 if (mode & FALLOC_FL_PUNCH_HOLE) { 1732 if (mode & FALLOC_FL_PUNCH_HOLE) {