Skip to content

Commit f2f2494

Browse files
Andi Kleenjtlayton
authored andcommitted
Add process name and pid to locks warning
It's fairly useless to complain about using an obsolete feature without telling the user which process used it. My Fedora desktop randomly drops this message, but I would really need this patch to figure out what triggers is. [ jlayton: print pid as well as process name ] Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Jeff Layton <[email protected]>
1 parent 77c6753 commit f2f2494

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/locks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2096,7 +2096,7 @@ SYSCALL_DEFINE2(flock, unsigned int, fd, unsigned int, cmd)
20962096
* throw a warning to let people know that they don't actually work.
20972097
*/
20982098
if (cmd & LOCK_MAND) {
2099-
pr_warn_once("Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n");
2099+
pr_warn_once("%s(%d): Attempt to set a LOCK_MAND lock via flock(2). This support has been removed and the request ignored.\n", current->comm, current->pid);
21002100
return 0;
21012101
}
21022102

0 commit comments

Comments
 (0)