aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/inode.c')
-rw-r--r--fs/cifs/inode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 53cce8cc2224..00d1ff339ae6 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -835,8 +835,10 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino)
835 rc = cifs_get_inode_info(&inode, full_path, NULL, sb, 835 rc = cifs_get_inode_info(&inode, full_path, NULL, sb,
836 xid, NULL); 836 xid, NULL);
837 837
838 if (!inode) 838 if (!inode) {
839 return ERR_PTR(rc); 839 inode = ERR_PTR(rc);
840 goto out;
841 }
840 842
841#ifdef CONFIG_CIFS_FSCACHE 843#ifdef CONFIG_CIFS_FSCACHE
842 /* populate tcon->resource_id */ 844 /* populate tcon->resource_id */
@@ -852,13 +854,11 @@ struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino)
852 inode->i_uid = cifs_sb->mnt_uid; 854 inode->i_uid = cifs_sb->mnt_uid;
853 inode->i_gid = cifs_sb->mnt_gid; 855 inode->i_gid = cifs_sb->mnt_gid;
854 } else if (rc) { 856 } else if (rc) {
855 kfree(full_path);
856 _FreeXid(xid);
857 iget_failed(inode); 857 iget_failed(inode);
858 return ERR_PTR(rc); 858 inode = ERR_PTR(rc);
859 } 859 }
860 860
861 861out:
862 kfree(full_path); 862 kfree(full_path);
863 /* can not call macro FreeXid here since in a void func 863 /* can not call macro FreeXid here since in a void func
864 * TODO: This is no longer true 864 * TODO: This is no longer true