]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/nilfs2/namei.c
Merge branch 'akpm/master'
[karo-tx-linux.git] / fs / nilfs2 / namei.c
index 22180836ec2201c0687c1faeb0ccc59315c2d6dd..c9a1a491aa9124b4cad5941e477f7ac3ae5de8b1 100644 (file)
@@ -120,9 +120,6 @@ nilfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev)
        struct nilfs_transaction_info ti;
        int err;
 
-       if (!new_valid_dev(rdev))
-               return -EINVAL;
-
        err = nilfs_transaction_begin(dir->i_sb, &ti, 1);
        if (err)
                return err;
@@ -496,8 +493,7 @@ static struct dentry *nilfs_fh_to_dentry(struct super_block *sb, struct fid *fh,
 {
        struct nilfs_fid *fid = (struct nilfs_fid *)fh;
 
-       if ((fh_len != NILFS_FID_SIZE_NON_CONNECTABLE &&
-            fh_len != NILFS_FID_SIZE_CONNECTABLE) ||
+       if (fh_len < NILFS_FID_SIZE_NON_CONNECTABLE ||
            (fh_type != FILEID_NILFS_WITH_PARENT &&
             fh_type != FILEID_NILFS_WITHOUT_PARENT))
                return NULL;
@@ -510,7 +506,7 @@ static struct dentry *nilfs_fh_to_parent(struct super_block *sb, struct fid *fh,
 {
        struct nilfs_fid *fid = (struct nilfs_fid *)fh;
 
-       if (fh_len != NILFS_FID_SIZE_CONNECTABLE ||
+       if (fh_len < NILFS_FID_SIZE_CONNECTABLE ||
            fh_type != FILEID_NILFS_WITH_PARENT)
                return NULL;