Update to 2.6.32.41 Mainline
/fs/cifs/inode.c
blob:303fd7f4dfe1a37a02dac79d38aae5bd7ea2e4c6 -> blob:33fa04954f63b1f93a2710a96aa5518872049a4b
--- fs/cifs/inode.c
+++ fs/cifs/inode.c
@@ -688,8 +688,10 @@ struct inode *cifs_root_iget(struct supe
rc = cifs_get_inode_info(&inode, full_path, NULL, sb,
xid, NULL);
- if (!inode)
- return ERR_PTR(-ENOMEM);
+ if (!inode) {
+ inode = ERR_PTR(rc);
+ goto out;
+ }
if (rc && cifs_sb->tcon->ipc) {
cFYI(1, ("ipc connection - fake read inode"));
@@ -700,13 +702,11 @@ struct inode *cifs_root_iget(struct supe
inode->i_uid = cifs_sb->mnt_uid;
inode->i_gid = cifs_sb->mnt_gid;
} else if (rc) {
- kfree(full_path);
- _FreeXid(xid);
iget_failed(inode);
- return ERR_PTR(rc);
+ inode = ERR_PTR(rc);
}
-
+out:
kfree(full_path);
/* can not call macro FreeXid here since in a void func
* TODO: This is no longer true