Skip to content

Commit 4acdaf2

Browse files
author
Al Viro
committed
switch ->create() to umode_t
vfs_create() ignores everything outside of 16bit subset of its mode argument; switching it to umode_t is obviously equivalent and it's the only caller of the method Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 18bb1db commit 4acdaf2

54 files changed

Lines changed: 72 additions & 72 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/filesystems/Locking‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ d_manage: no no yes (ref-walk) maybe
3737

3838
--------------------------- inode_operations ---------------------------
3939
prototypes:
40-
int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
40+
int (*create) (struct inode *,struct dentry *,umode_t, struct nameidata *);
4141
struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameid
4242
ata *);
4343
int (*link) (struct dentry *,struct inode *,struct dentry *);

‎Documentation/filesystems/vfs.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ This describes how the VFS can manipulate an inode in your
341341
filesystem. As of kernel 2.6.22, the following members are defined:
342342

343343
struct inode_operations {
344-
int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
344+
int (*create) (struct inode *,struct dentry *, umode_t, struct nameidata *);
345345
struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
346346
int (*link) (struct dentry *,struct inode *,struct dentry *);
347347
int (*unlink) (struct inode *,struct dentry *);

‎drivers/staging/pohmelfs/dir.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ static int pohmelfs_create_entry(struct inode *dir, struct dentry *dentry, u64 s
661661
/*
662662
* VFS create and mkdir callbacks.
663663
*/
664-
static int pohmelfs_create(struct inode *dir, struct dentry *dentry, int mode,
664+
static int pohmelfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
665665
struct nameidata *nd)
666666
{
667667
return pohmelfs_create_entry(dir, dentry, 0, mode);

‎fs/9p/vfs_inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
702702
*/
703703

704704
static int
705-
v9fs_vfs_create(struct inode *dir, struct dentry *dentry, int mode,
705+
v9fs_vfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
706706
struct nameidata *nd)
707707
{
708708
int err;

‎fs/9p/vfs_inode_dotl.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ int v9fs_open_to_dotl_flags(int flags)
253253
*/
254254

255255
static int
256-
v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
256+
v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, umode_t omode,
257257
struct nameidata *nd)
258258
{
259259
int err = 0;
@@ -284,7 +284,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
284284

285285
name = (char *) dentry->d_name.name;
286286
P9_DPRINTK(P9_DEBUG_VFS, "v9fs_vfs_create_dotl: name:%s flags:0x%x "
287-
"mode:0x%x\n", name, flags, omode);
287+
"mode:0x%hx\n", name, flags, omode);
288288

289289
dfid = v9fs_fid_lookup(dentry->d_parent);
290290
if (IS_ERR(dfid)) {

‎fs/affs/affs.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ extern void affs_free_bitmap(struct super_block *sb);
156156
extern int affs_hash_name(struct super_block *sb, const u8 *name, unsigned int len);
157157
extern struct dentry *affs_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *);
158158
extern int affs_unlink(struct inode *dir, struct dentry *dentry);
159-
extern int affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *);
159+
extern int affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *);
160160
extern int affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
161161
extern int affs_rmdir(struct inode *dir, struct dentry *dentry);
162162
extern int affs_link(struct dentry *olddentry, struct inode *dir,

‎fs/affs/namei.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,13 @@ affs_unlink(struct inode *dir, struct dentry *dentry)
255255
}
256256

257257
int
258-
affs_create(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
258+
affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, struct nameidata *nd)
259259
{
260260
struct super_block *sb = dir->i_sb;
261261
struct inode *inode;
262262
int error;
263263

264-
pr_debug("AFFS: create(%lu,\"%.*s\",0%o)\n",dir->i_ino,(int)dentry->d_name.len,
264+
pr_debug("AFFS: create(%lu,\"%.*s\",0%ho)\n",dir->i_ino,(int)dentry->d_name.len,
265265
dentry->d_name.name,mode);
266266

267267
inode = affs_new_inode(dir);

‎fs/afs/dir.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ static int afs_d_delete(const struct dentry *dentry);
2828
static void afs_d_release(struct dentry *dentry);
2929
static int afs_lookup_filldir(void *_cookie, const char *name, int nlen,
3030
loff_t fpos, u64 ino, unsigned dtype);
31-
static int afs_create(struct inode *dir, struct dentry *dentry, int mode,
31+
static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
3232
struct nameidata *nd);
3333
static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode);
3434
static int afs_rmdir(struct inode *dir, struct dentry *dentry);
@@ -948,7 +948,7 @@ static int afs_unlink(struct inode *dir, struct dentry *dentry)
948948
/*
949949
* create a regular file on an AFS filesystem
950950
*/
951-
static int afs_create(struct inode *dir, struct dentry *dentry, int mode,
951+
static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
952952
struct nameidata *nd)
953953
{
954954
struct afs_file_status status;
@@ -962,7 +962,7 @@ static int afs_create(struct inode *dir, struct dentry *dentry, int mode,
962962

963963
dvnode = AFS_FS_I(dir);
964964

965-
_enter("{%x:%u},{%s},%o,",
965+
_enter("{%x:%u},{%s},%ho,",
966966
dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode);
967967

968968
ret = -ENAMETOOLONG;

‎fs/bad_inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static const struct file_operations bad_file_ops =
173173
};
174174

175175
static int bad_inode_create (struct inode *dir, struct dentry *dentry,
176-
int mode, struct nameidata *nd)
176+
umode_t mode, struct nameidata *nd)
177177
{
178178
return -EIO;
179179
}

‎fs/bfs/dir.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ const struct file_operations bfs_dir_operations = {
8484

8585
extern void dump_imap(const char *, struct super_block *);
8686

87-
static int bfs_create(struct inode *dir, struct dentry *dentry, int mode,
87+
static int bfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
8888
struct nameidata *nd)
8989
{
9090
int err;

0 commit comments

Comments
 (0)