Commit 598b6c57 authored by Markus Elfring's avatar Markus Elfring Committed by Steve French

CIFS: Return directly after a failed build_path_from_dentry() in cifs_do_create()

Return directly after a call of the function "build_path_from_dentry"
failed at the beginning.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 2b1116bb
...@@ -244,10 +244,8 @@ cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned int xid, ...@@ -244,10 +244,8 @@ cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned int xid,
*oplock = REQ_OPLOCK; *oplock = REQ_OPLOCK;
full_path = build_path_from_dentry(direntry); full_path = build_path_from_dentry(direntry);
if (full_path == NULL) { if (!full_path)
rc = -ENOMEM; return -ENOMEM;
goto out;
}
if (tcon->unix_ext && cap_unix(tcon->ses) && !tcon->broken_posix_open && if (tcon->unix_ext && cap_unix(tcon->ses) && !tcon->broken_posix_open &&
(CIFS_UNIX_POSIX_PATH_OPS_CAP & (CIFS_UNIX_POSIX_PATH_OPS_CAP &
......
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