aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/gfs2/file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 6fe2a59c6a9a..c2062a108d19 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -911,11 +911,15 @@ out_qunlock:
911static long gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t len) 911static long gfs2_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
912{ 912{
913 struct inode *inode = file_inode(file); 913 struct inode *inode = file_inode(file);
914 struct gfs2_sbd *sdp = GFS2_SB(inode);
914 struct gfs2_inode *ip = GFS2_I(inode); 915 struct gfs2_inode *ip = GFS2_I(inode);
915 struct gfs2_holder gh; 916 struct gfs2_holder gh;
916 int ret; 917 int ret;
917 918
918 if ((mode & ~FALLOC_FL_KEEP_SIZE) || gfs2_is_jdata(ip)) 919 if (mode & ~FALLOC_FL_KEEP_SIZE)
920 return -EOPNOTSUPP;
921 /* fallocate is needed by gfs2_grow to reserve space in the rindex */
922 if (gfs2_is_jdata(ip) && inode != sdp->sd_rindex)
919 return -EOPNOTSUPP; 923 return -EOPNOTSUPP;
920 924
921 inode_lock(inode); 925 inode_lock(inode);