Re: [PATCH] ext4: fallocate_zero_range, check if is regular file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 17 Apr 2014, jon ernst wrote:

> Date: Thu, 17 Apr 2014 00:22:04 -0400
> From: jon ernst <jonernst07@xxxxxxxxx>
> To: "linux-ext4@xxxxxxxxxxxxxxx List" <linux-ext4@xxxxxxxxxxxxxxx>
> Subject: [PATCH] ext4: fallocate_zero_range, check if is regular file
> 
> fallocate_zero_range, check if inode is regular file.
> 
> Signed-off-by: Jon Ernst <jonernst07@xxxxxxxxx>

Thanks, you can add.

Reviewed-by: Lukas Czerner <lczerner@xxxxxxxxxx>

> ---
>  fs/ext4/extents.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
> index 1bb3e4b..756a3b9 100644
> --- a/fs/ext4/extents.c
> +++ b/fs/ext4/extents.c
> @@ -4742,6 +4742,8 @@ static long ext4_zero_range(struct file *file,
> loff_t offset,
> 
>     trace_ext4_zero_range(inode, offset, len, mode);
> 
> +   if (!S_ISREG(inode->i_mode))
> +       return -EOPNOTSUPP;
>     /*
>      * Write out all dirty pages to avoid race conditions
>      * Then release them.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux