Re: [PATCH] vfs: reorganize inode chattr checks

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

 



Dmitry Monakhov <dmonakhov@xxxxxxxxxx> writes:

> This patch fix nasty bug with truncate on swapfile.
> It contains only vfs core helpers and fix isize check path for
> fs w/o i_op->setattr method. Later i'll send corresponding changes
> to other fs which has ->setattr method.
>
> This patch is depends on Nick's patch
> http://marc.info/?l=linux-fsdevel&m=126752788514574&w=2
<skip>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 81c91d9..fb6809d 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2388,9 +2388,10 @@ extern int buffer_migrate_page(struct address_space *,
>  #else
>  #define buffer_migrate_page NULL
>  #endif
> -
> -extern int inode_change_ok(const struct inode *, struct iattr *);
Following define will be removed after all filesystems will be moved
to new isize check sequance. This will be the signal for external modules
to migrate to new logic.
> +#define inode_change_ok(inode, iattr) inode_change_posix_ok(inode, iattr)
> +extern int inode_change_posix_ok(const struct inode *, struct iattr *);
>  extern int inode_newsize_ok(const struct inode *, loff_t offset);
> +extern int inode_change_attr_ok(const struct inode *, struct iattr *);
>  extern int __must_check inode_setattr(struct inode *, const struct iattr *);
>  extern void generic_setattr(struct inode *inode, const struct iattr *attr);
--
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

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux