Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
[sfrench/cifs-2.6.git] / fs / ext2 / namei.c
index e1af5b4cf80c100c26ce08a559bbdab12de8753b..80c97fd8c571311280042d45343c9c220e458dd9 100644 (file)
@@ -63,9 +63,9 @@ static struct dentry *ext2_lookup(struct inode * dir, struct dentry *dentry, str
        ino = ext2_inode_by_name(dir, dentry);
        inode = NULL;
        if (ino) {
-               inode = iget(dir->i_sb, ino);
-               if (!inode)
-                       return ERR_PTR(-EACCES);
+               inode = ext2_iget(dir->i_sb, ino);
+               if (IS_ERR(inode))
+                       return ERR_CAST(inode);
        }
        return d_splice_alias(inode, dentry);
 }
@@ -83,10 +83,10 @@ struct dentry *ext2_get_parent(struct dentry *child)
        ino = ext2_inode_by_name(child->d_inode, &dotdot);
        if (!ino)
                return ERR_PTR(-ENOENT);
-       inode = iget(child->d_inode->i_sb, ino);
+       inode = ext2_iget(child->d_inode->i_sb, ino);
 
-       if (!inode)
-               return ERR_PTR(-EACCES);
+       if (IS_ERR(inode))
+               return ERR_CAST(inode);
        parent = d_alloc_anon(inode);
        if (!parent) {
                iput(inode);
@@ -373,7 +373,7 @@ out:
        return err;
 }
 
-struct inode_operations ext2_dir_inode_operations = {
+const struct inode_operations ext2_dir_inode_operations = {
        .create         = ext2_create,
        .lookup         = ext2_lookup,
        .link           = ext2_link,
@@ -393,7 +393,7 @@ struct inode_operations ext2_dir_inode_operations = {
        .permission     = ext2_permission,
 };
 
-struct inode_operations ext2_special_inode_operations = {
+const struct inode_operations ext2_special_inode_operations = {
 #ifdef CONFIG_EXT2_FS_XATTR
        .setxattr       = generic_setxattr,
        .getxattr       = generic_getxattr,