Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Steve French <stfrench@microsoft.com>

authored by

Markus Elfring and committed by
Steve French
598b6c57 2b1116bb

+2 -4
+2 -4
fs/cifs/dir.c
··· 244 244 *oplock = REQ_OPLOCK; 245 245 246 246 full_path = build_path_from_dentry(direntry); 247 - if (full_path == NULL) { 248 - rc = -ENOMEM; 249 - goto out; 250 - } 247 + if (!full_path) 248 + return -ENOMEM; 251 249 252 250 if (tcon->unix_ext && cap_unix(tcon->ses) && !tcon->broken_posix_open && 253 251 (CIFS_UNIX_POSIX_PATH_OPS_CAP &