mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
eb745dbccc
commit
64c23e8687
5 changed files with 8 additions and 3 deletions
|
|
@ -1426,7 +1426,7 @@ static long gfs2_fallocate(struct inode *inode, int mode, loff_t offset,
|
|||
next = (next + 1) << sdp->sd_sb.sb_bsize_shift;
|
||||
|
||||
/* We only support the FALLOC_FL_KEEP_SIZE mode */
|
||||
if (mode && (mode != FALLOC_FL_KEEP_SIZE))
|
||||
if (mode & ~FALLOC_FL_KEEP_SIZE)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
offset = (offset >> sdp->sd_sb.sb_bsize_shift) <<
|
||||
|
|
|
|||
Loading…
Reference in a new issue