From: Jan Kara <jack@suse.cz>
To: <linux-fsdevel@vger.kernel.org>
Cc: Jan Kara <jack@suse.cz>
Subject: [PATCH 1/2] udf: Drop pointless IS_IMMUTABLE and IS_APPEND check
Date: Mon, 20 May 2024 15:50:49 +0200 [thread overview]
Message-ID: <20240520135056.788-1-jack@suse.cz> (raw)
In-Reply-To: <20240520134853.21305-1-jack@suse.cz>
udf_setsize() checks for IS_IMMUTABLE and IS_APPEND flags. This is
however pointless as UDF does not have capability to store these flags
and never allows to set them. Furthermore this is the only place in UDF
code that was actually checking these flags. Remove the pointless check.
Signed-off-by: Jan Kara <jack@suse.cz>
---
fs/udf/inode.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 2f831a3a91af..04b0e62cf73f 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -1248,8 +1248,6 @@ int udf_setsize(struct inode *inode, loff_t newsize)
if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) ||
S_ISLNK(inode->i_mode)))
return -EINVAL;
- if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
- return -EPERM;
filemap_invalidate_lock(inode->i_mapping);
iinfo = UDF_I(inode);
--
2.35.3
next prev parent reply other threads:[~2024-05-20 13:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 13:50 [PATCH 0/2] udf: Correct lock ordering in udf_setsize() Jan Kara
2024-05-20 13:50 ` Jan Kara [this message]
2024-05-20 13:50 ` [PATCH 2/2] udf: Fix lock ordering in udf_evict_inode() Jan Kara
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=20240520135056.788-1-jack@suse.cz \
--to=jack@suse.cz \
--cc=linux-fsdevel@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 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 NNTP newsgroup(s).