zero i_uid/i_gid on inode allocation
[safe/jmp/linux-2.6] / drivers / infiniband / hw / ipath / ipath_fs.c
index 23faba9..8dc2bb7 100644 (file)
@@ -31,7 +31,6 @@
  * SOFTWARE.
  */
 
-#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/fs.h>
 #include <linux/mount.h>
@@ -58,9 +57,6 @@ static int ipathfs_mknod(struct inode *dir, struct dentry *dentry,
        }
 
        inode->i_mode = mode;
-       inode->i_uid = 0;
-       inode->i_gid = 0;
-       inode->i_blocks = 0;
        inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
        inode->i_private = data;
        if ((mode & S_IFMT) == S_IFDIR) {
@@ -87,7 +83,7 @@ static int create_file(const char *name, mode_t mode,
        *dentry = NULL;
        mutex_lock(&parent->d_inode->i_mutex);
        *dentry = lookup_one_len(name, parent, strlen(name));
-       if (!IS_ERR(dentry))
+       if (!IS_ERR(*dentry))
                error = ipathfs_mknod(parent->d_inode, *dentry,
                                      mode, fops, data);
        else