All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christian Brauner <brauner@kernel.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] proc: use pid_has_task() in proc_inode_is_dead()
Date: Sat, 17 Oct 2026 18:00:57 +0200	[thread overview]
Message-ID: <atObuVZXbl9n-zFq@redhat.com> (raw)

to make it more readable and consistent.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
 fs/proc/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/proc/base.c b/fs/proc/base.c
index 6a39de424f62..a545796177e8 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2064,7 +2064,7 @@ static int pid_revalidate(struct inode *dir, const struct qstr *name,
 
 static inline bool proc_inode_is_dead(struct inode *inode)
 {
-	return !proc_pid(inode)->tasks[PIDTYPE_PID].first;
+	return !pid_has_task(proc_pid(inode), PIDTYPE_PID);
 }
 
 int pid_delete_dentry(const struct dentry *dentry)
-- 
2.55.0



             reply	other threads:[~2026-10-17 16:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-17 16:00 Oleg Nesterov [this message]
2026-10-21 14:01 ` [PATCH] proc: use pid_has_task() in proc_inode_is_dead() Christian Brauner
  -- strict thread matches above, loose matches on Subject: below --
2026-12-02 17:52 Jiayi Zhang
2026-12-03  9:22 ` Oleg Nesterov
2026-12-03 10:32   ` Jiayi Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=atObuVZXbl9n-zFq@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.