From: Andrew Morton <akpm@digeo.com>
To: lkml <linux-kernel@vger.kernel.org>, linux-fsdevel@vger.kernel.org
Subject: [patch] remove BKL from inode_setattr
Date: Sun, 13 Oct 2002 22:02:14 -0700 [thread overview]
Message-ID: <3DAA4FD6.A18DAFE6@digeo.com> (raw)
Since April 05 of this year we've been holding the BKL across the
vmtruncate call out of inode_setattr(). By accident it seems.
This does not affect unlink(). It affects ftruncate() and open(O_TRUNC).
Given that the drop_inode() path does not take the BKL, I would
suggest that it is safe to assume that the various filesystem's
truncate code is safe without this additional VFS-level lock_kernel(),
and that it can be simply removed.
Sound sane?
--- 2.5.42/fs/attr.c~truncate-bkl Sun Oct 13 20:04:06 2002
+++ 2.5.42-akpm/fs/attr.c Sun Oct 13 22:01:15 2002
@@ -67,7 +67,6 @@ int inode_setattr(struct inode * inode,
unsigned int ia_valid = attr->ia_valid;
int error = 0;
- lock_kernel();
if (ia_valid & ATTR_SIZE) {
error = vmtruncate(inode, attr->ia_size);
if (error)
@@ -91,7 +90,6 @@ int inode_setattr(struct inode * inode,
}
mark_inode_dirty(inode);
out:
- unlock_kernel();
return error;
}
.
next reply other threads:[~2002-10-14 4:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-14 5:02 Andrew Morton [this message]
2002-10-14 6:09 ` [patch] remove BKL from inode_setattr Hugh Dickins
2002-10-14 6:34 ` Andrew Morton
2002-10-14 14:07 ` Steve Lord
2002-10-14 16:41 ` Andrew Morton
2002-10-14 16:49 ` Steve Lord
2002-10-14 14:41 ` Dave Kleikamp
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=3DAA4FD6.A18DAFE6@digeo.com \
--to=akpm@digeo.com \
--cc=linux-fsdevel@vger.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox