]> git.karo-electronics.de Git - linux-beck.git/commitdiff
infiniband: umode_t noise, including open-coded S_ISDIR()
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 25 Jul 2011 03:27:00 +0000 (23:27 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Wed, 4 Jan 2012 03:55:03 +0000 (22:55 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/infiniband/hw/ipath/ipath_fs.c
drivers/infiniband/hw/qib/qib_fs.c

index 31ae1b108aea95e7ad769e49f7dd875f3a195d72..b7d4216db3c35636ff91734e33d3ad0bcef357b1 100644 (file)
@@ -46,7 +46,7 @@
 static struct super_block *ipath_super;
 
 static int ipathfs_mknod(struct inode *dir, struct dentry *dentry,
-                        int mode, const struct file_operations *fops,
+                        umode_t mode, const struct file_operations *fops,
                         void *data)
 {
        int error;
@@ -61,7 +61,7 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry,
        inode->i_mode = mode;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
        inode->i_private = data;
-       if ((mode & S_IFMT) == S_IFDIR) {
+       if (S_ISDIR(mode)) {
                inode->i_op = &simple_dir_inode_operations;
                inc_nlink(inode);
                inc_nlink(dir);
@@ -76,7 +76,7 @@ bail:
        return error;
 }
 
-static int create_file(const char *name, mode_t mode,
+static int create_file(const char *name, umode_t mode,
                       struct dentry *parent, struct dentry **dentry,
                       const struct file_operations *fops, void *data)
 {
index df7fa251dcdc5e6e32135be4d1867398d63588e3..05e0f17c5b449414a6313e4822e692c924de9fd4 100644 (file)
@@ -47,7 +47,7 @@ static struct super_block *qib_super;
 #define private2dd(file) ((file)->f_dentry->d_inode->i_private)
 
 static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
-                      int mode, const struct file_operations *fops,
+                      umode_t mode, const struct file_operations *fops,
                       void *data)
 {
        int error;
@@ -67,7 +67,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry,
        inode->i_mtime = inode->i_atime;
        inode->i_ctime = inode->i_atime;
        inode->i_private = data;
-       if ((mode & S_IFMT) == S_IFDIR) {
+       if (S_ISDIR(mode)) {
                inode->i_op = &simple_dir_inode_operations;
                inc_nlink(inode);
                inc_nlink(dir);
@@ -82,7 +82,7 @@ bail:
        return error;
 }
 
-static int create_file(const char *name, mode_t mode,
+static int create_file(const char *name, umode_t mode,
                       struct dentry *parent, struct dentry **dentry,
                       const struct file_operations *fops, void *data)
 {