]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
smb: client: Use common code in cifs_do_create()
authorMarkus Elfring <elfring@users.sourceforge.net>
Sun, 5 Oct 2025 18:36:33 +0000 (20:36 +0200)
committerSteve French <stfrench@microsoft.com>
Tue, 7 Oct 2025 18:31:27 +0000 (13:31 -0500)
Use a label once more so that a bit of common code can be better reused
at the end of this function implementation.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Acked-by: Enzo Matsumiya <ematsumiya@suse.de>
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/dir.c

index f64e992ec7242e1dda64b0c5330e0514840d5f23..da5597dbf5b9f140c6801158ac2357fa911c52ab 100644 (file)
@@ -200,8 +200,8 @@ static int cifs_do_create(struct inode *inode, struct dentry *direntry, unsigned
 
        full_path = build_path_from_dentry(direntry, page);
        if (IS_ERR(full_path)) {
-               free_dentry_path(page);
-               return PTR_ERR(full_path);
+               rc = PTR_ERR(full_path);
+               goto out;
        }
 
        /* If we're caching, we need to be able to fill in around partial writes. */