Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 231651
b: refs/heads/master
c: 64c23e8
h: refs/heads/master
i:
  231649: 0e18579
  231647: a766b39
v: v3
  • Loading branch information
Christoph Hellwig authored and Al Viro committed Jan 17, 2011
1 parent d31ab7f commit accd331
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eb745dbccce56f1bbe3f80b95ad2a325145171c2
refs/heads/master: 64c23e86873ee410554d6d1c76b60da47025e96f
2 changes: 1 addition & 1 deletion trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -7116,7 +7116,7 @@ static long btrfs_fallocate(struct inode *inode, int mode,
alloc_end = (offset + len + mask) & ~mask;

/* We only support the FALLOC_FL_KEEP_SIZE mode */
if (mode && (mode != FALLOC_FL_KEEP_SIZE))
if (mode & ~FALLOC_FL_KEEP_SIZE)
return -EOPNOTSUPP;

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -3645,7 +3645,7 @@ long ext4_fallocate(struct inode *inode, int mode, loff_t offset, loff_t len)
unsigned int credits, blkbits = inode->i_blkbits;

/* We only support the FALLOC_FL_KEEP_SIZE mode */
if (mode && (mode != FALLOC_FL_KEEP_SIZE))
if (mode & ~FALLOC_FL_KEEP_SIZE)
return -EOPNOTSUPP;

/*
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/gfs2/ops_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) <<
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1997,6 +1997,8 @@ static long ocfs2_fallocate(struct inode *inode, int mode, loff_t offset,
int change_size = 1;
int cmd = OCFS2_IOC_RESVSP64;

if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
return -EOPNOTSUPP;
if (!ocfs2_writes_unwritten_extents(osb))
return -EOPNOTSUPP;

Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/xfs/linux-2.6/xfs_iops.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,9 @@ xfs_vn_fallocate(
xfs_inode_t *ip = XFS_I(inode);
int cmd = XFS_IOC_RESVSP;

if (mode & ~(FALLOC_FL_KEEP_SIZE | FALLOC_FL_PUNCH_HOLE))
return -EOPNOTSUPP;

/* preallocation on directories not yet supported */
error = -ENODEV;
if (S_ISDIR(inode->i_mode))
Expand Down

0 comments on commit accd331

Please sign in to comment.