]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
vfs: get rid of BUG_ON() in d_mark_tmpfile_name()
authorPaulo Alcantara <pc@manguebit.org>
Tue, 14 Apr 2026 14:37:21 +0000 (11:37 -0300)
committerSteve French <stfrench@microsoft.com>
Tue, 14 Apr 2026 17:01:12 +0000 (12:01 -0500)
commit15e9e00a5aa4f56ca1cff7749c166e072d7cb6ac
treeee15cc1a45f142491136b0201ea610e46b516fc5
parent81dc1e4d32b064ac47abc60b0acbf49b66a34d52
vfs: get rid of BUG_ON() in d_mark_tmpfile_name()

Do proper error handling in d_mark_tmpfile_name() by returning errors
rather than using BUG_ON()'s.

Adjust caller to check for errors from d_mark_tmpfile_name() as well
as clean it up for using return value from scnprintf() in QSTR_LEN()
to make it more obvious where the tmpfile name's length is coming
from.

Link: https://lore.kernel.org/r/CAHk-=wgerpUKCDhdzKH0FEdLyfhj3doc9t+kO9Yb6rSsTp7hdQ@mail.gmail.com
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Paulo Alcantara (Red Hat) <pc@manguebit.org>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Jan Kara <jack@suse.cz>
CC: linux-fsdevel@vger.kernel.org
Cc: linux-cifs@vger.kernel.org
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/dcache.c
fs/smb/client/cifsfs.h
fs/smb/client/dir.c
include/linux/dcache.h