aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2011-01-14 07:07:30 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2011-01-17 02:25:30 -0500
commit64c23e86873ee410554d6d1c76b60da47025e96f (patch)
treeb30c5ff8782ebfdec6956d7834f796731fd3a1d4 /fs/btrfs
parenteb745dbccce56f1bbe3f80b95ad2a325145171c2 (diff)
make the feature checks in ->fallocate future proof
Instead of various home grown checks that might need updates for new flags just check for any bit outside the mask of the features supported by the filesystem. This makes the check future proof for any newly added flag. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index a3798a3aa0d2..64daf2acd0d5 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7116,7 +7116,7 @@ static long btrfs_fallocate(struct inode *inode, int mode,
7116 alloc_end = (offset + len + mask) & ~mask; 7116 alloc_end = (offset + len + mask) & ~mask;
7117 7117
7118 /* We only support the FALLOC_FL_KEEP_SIZE mode */ 7118 /* We only support the FALLOC_FL_KEEP_SIZE mode */
7119 if (mode && (mode != FALLOC_FL_KEEP_SIZE)) 7119 if (mode & ~FALLOC_FL_KEEP_SIZE)
7120 return -EOPNOTSUPP; 7120 return -EOPNOTSUPP;
7121 7121
7122 /* 7122 /*