Commit 4da6e525 authored by Steve French's avatar Steve French

[CIFS] fix recent cifs symlink change so as not call kfree on null path

Signed-off-by: Steve French (sfrench@us.ibm.com)  
parent 21366d93
...@@ -106,7 +106,7 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd) ...@@ -106,7 +106,7 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd)
up(&direntry->d_sb->s_vfs_rename_sem); up(&direntry->d_sb->s_vfs_rename_sem);
if (!full_path) if (!full_path)
goto out; goto out_no_free;
cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode)); cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode));
cifs_sb = CIFS_SB(inode->i_sb); cifs_sb = CIFS_SB(inode->i_sb);
...@@ -126,9 +126,8 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd) ...@@ -126,9 +126,8 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd)
else { else {
/* rc = CIFSSMBQueryReparseLinkInfo */ /* rc = CIFSSMBQueryReparseLinkInfo */
/* BB Add code to Query ReparsePoint info */ /* BB Add code to Query ReparsePoint info */
/* BB Add MAC style xsymlink check here if enabled */
} }
/* BB Anything else to do to handle recursive links? */
/* BB Should we be using page symlink ops here? */
if (rc == 0) { if (rc == 0) {
...@@ -142,6 +141,7 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd) ...@@ -142,6 +141,7 @@ cifs_follow_link(struct dentry *direntry, struct nameidata *nd)
out: out:
kfree(full_path); kfree(full_path);
out_no_free:
FreeXid(xid); FreeXid(xid);
nd_set_link(nd, target_path); nd_set_link(nd, target_path);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment