22 May, 2010
40 commits
-
ADDPART_FLAG_RAID was introduced in commit d18d768, and most places were
converted to use it instead of a hardcoded value. However, some places seem
to have been missed.Change all of them to the symbolic names via the following semantic patch:
@@
struct parsed_partitions *state;
expression E;
@@
(
- state->parts[E].flags = 1
+ state->parts[E].flags = ADDPART_FLAG_RAID
|
- state->parts[E].flags |= 1
+ state->parts[E].flags |= ADDPART_FLAG_RAID
|
- state->parts[E].flags = 2
+ state->parts[E].flags = ADDPART_FLAG_WHOLEDISK
|
- state->parts[E].flags |= 2
+ state->parts[E].flags |= ADDPART_FLAG_WHOLEDISK
)Signed-off-by: Cesar Eduardo Barros
Signed-off-by: Al Viro -
Now that the last user passing a NULL file pointer is gone we can remove
the redundant dentry argument and associated hacks inside vfs_fsynmc_range.The next step will be removig the dentry argument from ->fsync, but given
the luck with the last round of method prototype changes I'd rather
defer this until after the main merge window.Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro -
Instead of just looking up a path use do_filp_open to get us a file
structure for the nfs4 recovery directory. This allows us to get
rid of the last non-standard vfs_fsync caller with a NULL file
pointer.[AV: should be using fput(), not filp_close()]
Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro -
Using atomic_inc_return in __iget(struct inode *inode) makes the intent
of this code clearer and generates less code on processors that have
this operation.On x86_64 this patch reduces the text size of inode.o by 12 bytes.
Signed-off-by: Richard Kennedy
----
patch against 2.6.34-rc7
compiled & tested on x86_64 AMD X2I've been running with this patch applied for several weeks with no
obvious problems.
regards
Richard
Signed-off-by: Al Viro -
anon_inode_mkinode() sets inode->i_mode = S_IRUSR | S_IWUSR; This means
that (inode->i_mode & S_IFMT) == 0. This trips up some SELinux code that
needs to determine if a given inode is a regular file, a directory, etc.
The easiest solution is to just make sure that the anon_inode also sets
S_IFREG.Signed-off-by: Eric Paris
Signed-off-by: Al Viro -
Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
The entries in xattr handler table should be immutable (ie const)
like other operation tables.Later patches convert common filesystems. Uncoverted filesystems
will still work, but will generate a compiler warning.Signed-off-by: Stephen Hemminger
Signed-off-by: Al Viro -
Currently the way we do freezing is by passing sb>s_bdev to freeze_bdev and then
letting it do all the work. But freezing is more of an fs thing, and doesn't
really have much to do with the bdev at all, all the work gets done with the
super. In btrfs we do not populate s_bdev, since we can have multiple bdev's
for one fs and setting s_bdev makes removing devices from a pool kind of tricky.
This means that freezing a btrfs filesystem fails, which causes us to corrupt
with things like tux-on-ice which use the fsfreeze mechanism. So instead of
populating sb->s_bdev with a random bdev in our pool, I've broken the actual fs
freezing stuff into freeze_super and thaw_super. These just take the
super_block that we're freezing and does the appropriate work. It's basically
just copy and pasted from freeze_bdev. I've then converted freeze_bdev over to
use the new super helpers. I've tested this with ext4 and btrfs and verified
everything continues to work the same as before.The only new gotcha is multiple calls to the fsfreeze ioctl will return EBUSY if
the fs is already frozen. I thought this was a better solution than adding a
freeze counter to the super_block, but if everybody hates this idea I'm open to
suggestions. Thanks,Signed-off-by: Josef Bacik
Signed-off-by: Al Viro -
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
... kill their private list, while we are at it
Signed-off-by: Al Viro
-
... and switch the simple "loop over superblocks and do something"
loops to it.Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
... and get rid of the last __put_super_and_need_restart() caller
Signed-off-by: Al Viro
-
If superblock had been still alive, we would've returned it...
Signed-off-by: Al Viro
-
This one needs restarts...
Signed-off-by: Al Viro
-
need list_for_each_entry_safe() here. Original didn't even
have restart logics, so if you race with umount() it blew up.Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
At the same time we can kill s_need_restart and local mutex in there.
__put_super() made public for a while; will be gone later.Signed-off-by: Al Viro
-
We used to remove from s_list and s_instances at the same
time. So let's *not* do the former and skip superblocks
that have empty s_instances in the loops over s_list.The next step, of course, will be to get rid of rescan logics
in those loops.Signed-off-by: Al Viro
-
Make sure that s_umount is acquired *before* we drop the final
active reference; we still have the fast path (atomic_dec_unless)
and we have gotten rid of the window between the moment when
s_active hits zero and s_umount is acquired. Which simplifies
the living hell out of grab_super() and inotify pin_to_kill()
stuff.Signed-off-by: Al Viro
-
use atomic_inc_not_zero(&sb->s_active) instead of playing games with
checking ->s_count > S_BIASSigned-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
First of all, get_sb_nodev() grabs anon dev minor and we
never free it in ecryptfs ->kill_sb(). Moreover, on one
of the failure exits in ecryptfs_get_sb() we leak things -
it happens before we set ->s_root and ->put_super() won't
be called in that case. Solution: kill ->put_super(), do
all that stuff in ->kill_sb(). And use kill_anon_sb() instead
of generic_shutdown_super() to deal with anon dev leak.Signed-off-by: Al Viro
-
postpone simple_set_mnt() until we know we won't fail.
Signed-off-by: Al Viro
-
Signed-off-by: Christoph Hellwig
Signed-off-by: Al Viro -
We set the "it's dead, don't mount on it" flag _and_ do not remove it if
we turn the damn thing negative and leave it around. And if it goes
positive afterwards, well...Fortunately, there's only one place where that needs to be caught:
only d_delete() can turn the sucker negative without immediately freeing
it; all other places that can lead to ->d_iput() call are followed by
unconditionally freeing struct dentry in question. So the fix is obvious:Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16014
Reported-by: Adam Tkac
Tested-by: Adam Tkac
Cc: [2.6.34.x]Signed-off-by: Al Viro
-
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6:
udf: BKL ioctl pushdown