On Fri, 18 Jul 2014, Rohan Puri wrote: > Date: Fri, 18 Jul 2014 15:28:38 +0530 > From: Rohan Puri <rohan.puri15@xxxxxxxxx> > To: hch@xxxxxxxxxxxxx, viro@xxxxxxxxxxxxxxxxxx > Cc: linux-fsdevel@xxxxxxxxxxxxxxx > Subject: [PATCH 2/2] Remove redundant inode mode checks for ceph & ext4 > > These checks are not needed here, since they are already performed > by do_fallocate() NAK, they are actually needed because we do not support fallocate on directories here. -Lukas > > Signed-off-by: Rohan Puri <rohan.puri15@xxxxxxxxx> > --- > fs/ceph/file.c | 3 --- > fs/ext4/inode.c | 3 --- > 2 files changed, 6 deletions(-) > > diff --git a/fs/ceph/file.c b/fs/ceph/file.c > index 88a6df4..687a72e 100644 > --- a/fs/ceph/file.c > +++ b/fs/ceph/file.c > @@ -1218,9 +1218,6 @@ static long ceph_fallocate(struct file *file, int mode, > loff_t endoff = 0; > loff_t size; > > - if (!S_ISREG(inode->i_mode)) > - return -EOPNOTSUPP; > - > mutex_lock(&inode->i_mutex); > > if (ceph_snap(inode) != CEPH_NOSNAP) { > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > index 7fcd68e..22c9868 100644 > --- a/fs/ext4/inode.c > +++ b/fs/ext4/inode.c > @@ -3532,9 +3532,6 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length) > unsigned int credits; > int ret = 0; > > - if (!S_ISREG(inode->i_mode)) > - return -EOPNOTSUPP; > - > trace_ext4_punch_hole(inode, offset, length, 0); > > /* > -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html