diff options
| author | Andries E. Brouwer <andries.brouwer@cwi.nl> | 2002-11-19 17:36:12 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-11-19 17:36:12 -0800 |
| commit | 72c85a120f2e9a6deb5a3059108467d54bcbbb6f (patch) | |
| tree | 923596b73ab677f8aa730283b5e2288ba9ad7cb7 /include/linux | |
| parent | 4187292175638e71e02a3522e1bc8372478d6888 (diff) | |
[PATCH] *_mknod prototype
The dev_t argument of sys_mknod is passed to vfs_mknod, and is then cast
to int when foo_mknod is called, and is subsequently very often cast
back to dev_t. (For example, minix_mknod() calls minix_set_inode() that
takes a dev_t.)
This is a cleanup that avoids this back-and-forth casting by giving
foo_mknod a prototype with dev_t. In most cases now the dev_t is
transmitted untouched until init_special_inode.
It also makes the two routines hugetlbfs_get_inode() and
shmem_get_inode() static.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/coda_psdev.h | 10 | ||||
| -rw-r--r-- | include/linux/fs.h | 4 | ||||
| -rw-r--r-- | include/linux/umsdos_fs.p | 2 | ||||
| -rw-r--r-- | include/linux/umsdos_fs_i.h | 6 |
4 files changed, 11 insertions, 11 deletions
diff --git a/include/linux/coda_psdev.h b/include/linux/coda_psdev.h index defce1be68ce..0e3f73f7a73e 100644 --- a/include/linux/coda_psdev.h +++ b/include/linux/coda_psdev.h @@ -47,13 +47,13 @@ int venus_close(struct super_block *sb, struct ViceFid *fid, int flags, int venus_open(struct super_block *sb, struct ViceFid *fid, int flags, struct file **f); int venus_mkdir(struct super_block *sb, struct ViceFid *dirfid, - const char *name, int length, - struct ViceFid *newfid, struct coda_vattr *attrs); + const char *name, int length, + struct ViceFid *newfid, struct coda_vattr *attrs); int venus_create(struct super_block *sb, struct ViceFid *dirfid, - const char *name, int length, int excl, int mode, int rdev, - struct ViceFid *newfid, struct coda_vattr *attrs) ; + const char *name, int length, int excl, int mode, dev_t rdev, + struct ViceFid *newfid, struct coda_vattr *attrs) ; int venus_rmdir(struct super_block *sb, struct ViceFid *dirfid, - const char *name, int length); + const char *name, int length); int venus_remove(struct super_block *sb, struct ViceFid *dirfid, const char *name, int length); int venus_readlink(struct super_block *sb, struct ViceFid *fid, diff --git a/include/linux/fs.h b/include/linux/fs.h index 7aa6498d7d5d..bbb4e2cacecc 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -773,7 +773,7 @@ struct inode_operations { int (*symlink) (struct inode *,struct dentry *,const char *); int (*mkdir) (struct inode *,struct dentry *,int); int (*rmdir) (struct inode *,struct dentry *); - int (*mknod) (struct inode *,struct dentry *,int,int); + int (*mknod) (struct inode *,struct dentry *,int,dev_t); int (*rename) (struct inode *, struct dentry *, struct inode *, struct dentry *); int (*readlink) (struct dentry *, char *,int); @@ -1109,7 +1109,7 @@ extern inline const char *bdevname(struct block_device *bdev) } extern const char * cdevname(kdev_t); extern const char * kdevname(kdev_t); -extern void init_special_inode(struct inode *, umode_t, int); +extern void init_special_inode(struct inode *, umode_t, dev_t); /* Invalid inode operations -- fs/bad_inode.c */ extern void make_bad_inode(struct inode *); diff --git a/include/linux/umsdos_fs.p b/include/linux/umsdos_fs.p index 99e6eefa8229..7034b7eb6b16 100644 --- a/include/linux/umsdos_fs.p +++ b/include/linux/umsdos_fs.p @@ -82,7 +82,7 @@ int UMSDOS_mkdir (struct inode *dir, int UMSDOS_mknod (struct inode *dir, struct dentry *dentry, int mode, - int rdev); + dev_t rdev); int UMSDOS_rmdir (struct inode *dir,struct dentry *dentry); int UMSDOS_unlink (struct inode *dir, struct dentry *dentry); int UMSDOS_rename (struct inode *old_dir, diff --git a/include/linux/umsdos_fs_i.h b/include/linux/umsdos_fs_i.h index 0edfb1d541a4..f4c992b44cd2 100644 --- a/include/linux/umsdos_fs_i.h +++ b/include/linux/umsdos_fs_i.h @@ -50,9 +50,9 @@ struct dir_locking_info { struct umsdos_inode_info { struct msdos_inode_info msdos_info; struct dir_locking_info dir_info; - int i_patched; /* Inode has been patched */ - int i_is_hlink; /* Resolved hardlink inode? */ - off_t pos; /* Entry offset in the emd_owner file */ + int i_patched; /* Inode has been patched */ + int i_is_hlink; /* Resolved hardlink inode? */ + off_t pos; /* Entry offset in the emd_owner file */ }; #endif |
