From: Al Viro <viro@ZenIV.linux.org.uk>
To: chris.mason@oracle.com
Cc: linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org
Subject: [RFC] a couple of i_nlink fixes in btrfs
Date: Fri, 4 Mar 2011 17:13:53 +0000 [thread overview]
Message-ID: <20110304171353.GU22723@ZenIV.linux.org.uk> (raw)
a) rename() plays with i_nlink of old_inode; bad, since it's not
locked. I'd add a variant of btrfs_unlink_inode() that would leave
btrfs_drop_nlink()/btrfs_update_inode() to callers and use it instead.
b) btrfs_link() doesn't check for i_nlink overflows. I don't
know if there's anything preventing that many links to a file on btrfs,
but if there is, it's at least worth a comment in there...
Please, review; patches in followups or in #btrfs in vfs-2.6.git
next reply other threads:[~2011-03-04 17:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-04 17:13 Al Viro [this message]
2011-03-04 17:14 ` [PATCH 1/2] btrfs: don't mess with i_nlink of unlocked inode in rename() Al Viro
2011-03-04 17:15 ` [PATCH 2/2] btrfs: check link counter overflow in link(2) Al Viro
2011-03-07 16:58 ` [RFC] a couple of i_nlink fixes in btrfs Chris Mason
2011-03-21 5:17 ` Al Viro
2011-03-21 11:37 ` Chris Mason
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=20110304171353.GU22723@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).