diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2016-12-04 17:33:17 +0000 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-12-16 11:02:57 +0100 |
commit | 32a3d848eb91a298334991f1891e12e0362f91db (patch) | |
tree | 693bf24282b44846903e45ff0ac165d8ef76e218 /fs/overlayfs/overlayfs.h | |
parent | 9aba652190f8cdced66967c97d6159de0cc8478e (diff) | |
download | linux-32a3d848eb91a298334991f1891e12e0362f91db.tar.gz linux-32a3d848eb91a298334991f1891e12e0362f91db.tar.bz2 linux-32a3d848eb91a298334991f1891e12e0362f91db.zip |
ovl: clean up kstat usage
FWIW, there's a bit of abuse of struct kstat in overlayfs object
creation paths - for one thing, it ends up with a very small subset
of struct kstat (mode + rdev), for another it also needs link in
case of symlinks and ends up passing it separately.
IMO it would be better to introduce a separate object for that.
In principle, we might even lift that thing into general API and switch
->mkdir()/->mknod()/->symlink() to identical calling conventions. Hell
knows, perhaps ->create() as well...
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/overlayfs/overlayfs.h')
-rw-r--r-- | fs/overlayfs/overlayfs.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index e07aa7b0ddb7..8af450b0e57a 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -212,8 +212,13 @@ static inline void ovl_copyattr(struct inode *from, struct inode *to) /* dir.c */ extern const struct inode_operations ovl_dir_inode_operations; struct dentry *ovl_lookup_temp(struct dentry *workdir, struct dentry *dentry); +struct cattr { + dev_t rdev; + umode_t mode; + const char *link; +}; int ovl_create_real(struct inode *dir, struct dentry *newdentry, - struct kstat *stat, const char *link, + struct cattr *attr, struct dentry *hardlink, bool debug); void ovl_cleanup(struct inode *dir, struct dentry *dentry); |