Linux-Security-Module Archive mirror
 help / color / mirror / Atom feed
From: John Johansen <john.johansen@canonical.com>
To: Colin Ian King <colin.i.king@gmail.com>,
	Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	"Serge E . Hallyn" <serge@hallyn.com>,
	apparmor@lists.ubuntu.com, linux-security-module@vger.kernel.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] apparmor: remove useless static inline function is_deleted
Date: Fri, 10 May 2024 08:46:25 -0700	[thread overview]
Message-ID: <6200bc6e-6903-4a01-a3d9-74f90c6de2b7@canonical.com> (raw)
In-Reply-To: <20240304163655.771616-1-colin.i.king@gmail.com>

On 3/4/24 08:36, Colin Ian King wrote:
> The inlined function is_deleted is redundant, it is not called at all
> from any function in security/apparmor/file.c and so it can be removed.
> 
> Cleans up clang scan build warning:
> security/apparmor/file.c:153:20: warning: unused function
> 'is_deleted' [-Wunused-function]
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>

Acked-by: John Johansen <john.johanse@canonical.com>

I have pulled this into my tree

> ---
>   security/apparmor/file.c | 13 -------------
>   1 file changed, 13 deletions(-)
> 
> diff --git a/security/apparmor/file.c b/security/apparmor/file.c
> index c03eb7c19f16..d52a5b14dad4 100644
> --- a/security/apparmor/file.c
> +++ b/security/apparmor/file.c
> @@ -144,19 +144,6 @@ int aa_audit_file(const struct cred *subj_cred,
>   	return aa_audit(type, profile, &ad, file_audit_cb);
>   }
>   
> -/**
> - * is_deleted - test if a file has been completely unlinked
> - * @dentry: dentry of file to test for deletion  (NOT NULL)
> - *
> - * Returns: true if deleted else false
> - */
> -static inline bool is_deleted(struct dentry *dentry)
> -{
> -	if (d_unlinked(dentry) && d_backing_inode(dentry)->i_nlink == 0)
> -		return true;
> -	return false;
> -}
> -
>   static int path_name(const char *op, const struct cred *subj_cred,
>   		     struct aa_label *label,
>   		     const struct path *path, int flags, char *buffer,


      reply	other threads:[~2024-05-10 15:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 16:36 [PATCH][next] apparmor: remove useless static inline function is_deleted Colin Ian King
2024-05-10 15:46 ` John Johansen [this message]

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=6200bc6e-6903-4a01-a3d9-74f90c6de2b7@canonical.com \
    --to=john.johansen@canonical.com \
    --cc=apparmor@lists.ubuntu.com \
    --cc=colin.i.king@gmail.com \
    --cc=jmorris@namei.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=serge@hallyn.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).