From: Daniel Dressler <danieru.dressler@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Is it safe to refactor struct btrfs_root *root out of these functions?
Date: Tue, 11 Nov 2014 22:29:03 +0900 [thread overview]
Message-ID: <CAGC3nLBAruRcurhu8sd6NtP6mHFaFw_eunwhqq7xuqsiQ6Mmog@mail.gmail.com> (raw)
Hi
I'm gearing up to tackle the "Pass fs_info instead of root " project
suggested on the wiki.
I've read through the entire codebase and made note of 102 functions
which could be refactored. Three of these do not make any use of their
root argument at all, is it safe to refactor these as well?
Namely:
btrfs_block_rsv_check :
http://lxr.free-electrons.com/source/fs/btrfs/extent-tree.c#L4743
copy_to_sk : http://lxr.free-electrons.com/source/fs/btrfs/ioctl.c#L1931
wait_for_commit :
http://lxr.free-electrons.com/source/fs/btrfs/transaction.c#L597
None of these function's users make indirect calls through function
pointers. Is it safe to refactor them? I ask because it seems strange
they would have unused arguments and I'm worried there might be a
reason I've missed.
Daniel
reply other threads:[~2014-11-11 13:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=CAGC3nLBAruRcurhu8sd6NtP6mHFaFw_eunwhqq7xuqsiQ6Mmog@mail.gmail.com \
--to=danieru.dressler@gmail.com \
--cc=linux-btrfs@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).