31 May, 2012
10 commits
-
When a file is truncated with truncate()/ftruncate() and then closed,
iversion is not updated. This patch uses ATTR_SIZE flag as an indication
to increment iversion.Mimi said:
On fput(), i_version is used to detect and flag files that have changed
and need to be re-measured in the IMA measurement policy. When a file
is truncated with truncate()/ftruncate() and then closed, i_version is
not updated. As a result, although the file has changed, it will not be
re-measured and added to the IMA measurement list on subsequent access.Signed-off-by: Dmitry Kasatkin
Acked-by: Mimi Zohar
Cc: Al Viro
Cc:
Signed-off-by: Andrew Morton
Signed-off-by: Al Viro -
bh_cachep is only written to once on initialization, so move it to the
__read_mostly section.Signed-off-by: Shai Fultheim
Signed-off-by: Vlad Zolotarov
Signed-off-by: Al Viro -
file_remove_suid() is a generic function operates on struct file,
it almost has no relations with file mapping, so move it to fs/inode.c.Cc: Alexander Viro
Signed-off-by: Cong Wang
Signed-off-by: Al Viro -
Currently JFFS2 file-system maps the VFS "superblock" abstraction to the
write-buffer. Namely, it uses VFS services to synchronize the write-buffer
periodically.The whole "superblock write-out" VFS infrastructure is served by the
'sync_supers()' kernel thread, which wakes up every 5 (by default) seconds and
writes out all dirty superblock using the '->write_super()' call-back. But the
problem with this thread is that it wastes power by waking up the system every
5 seconds no matter what. So we want to kill it completely and thus, we need to
make file-systems to stop using the '->write_super' VFS service, and then
remove it together with the kernel thread.This patch switches the JFFS2 write-buffer management from
'->write_super()'/'->s_dirt' to a delayed work. Instead of setting the 's_dirt'
flag we just schedule a delayed work for synchronizing the write-buffer.Signed-off-by: Artem Bityutskiy
Signed-off-by: Al Viro -
We do not need to call 'jffs2_write_super()' on sync. This function
causes a GC pass to make sure the current contents is pushed out with
the data which we already have on the media.But this is not needed on unmount and only slows sync down unnecessarily.
It is enough to just sync the write-buffer.This call was added by one of the generic VFS rework patch-sets,
see d579ed00aa96a7f7486978540a0d7cecaff742ae.Signed-off-by: Artem Bityutskiy
Signed-off-by: Al Viro -
We do not need to call 'jffs2_write_super()' on unmount. This function
causes a GC pass to make sure the current contents is pushed out with
the data which we already have on the media.But this is not needed on unmount and only slows unmount down unnecessarily.
It is enough to just sync the write-buffer.This call was added by one of the generic VFS rework patch-sets,
see 8c85e125124a473d6f3e9bb187b0b84207f81d91.Signed-off-by: Artem Bityutskiy
Signed-off-by: Al Viro -
We do not need 'lock_super()'/'unlock_super()' in JFFS2 - kill them.
Signed-off-by: Artem Bityutskiy
Signed-off-by: Al Viro -
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
30 May, 2012
30 commits
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
lglocks and brlocks are currently generated with some complicated macros
in lglock.h. But there's no reason to not just use common utility
functions and put all the data into a common data structure.In preparation, this patch changes the API to look more like normal
function calls with pointers, not magic macros.The patch is rather large because I move over all users in one go to keep
it bisectable. This impacts the VFS somewhat in terms of lines changed.
But no actual behaviour change.[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Andi Kleen
Cc: Al Viro
Cc: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Rusty Russell
Signed-off-by: Al Viro -
lglocks and brlocks are currently generated with some complicated macros
in lglock.h. But there's no reason to not just use common utility
functions and put all the data into a common data structure.Since there are at least two users it makes sense to share this code in a
library. This is also easier maintainable than a macro forest.This will also make it later possible to dynamically allocate lglocks and
also use them in modules (this would both still need some additional, but
now straightforward, code)[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Andi Kleen
Cc: Al Viro
Cc: Rusty Russell
Signed-off-by: Andrew Morton
Signed-off-by: Rusty Russell
Signed-off-by: Al Viro -
Optimizing the slow paths adds a lot of complexity. If you need to
grab every lock often, you have other problems.Signed-off-by: Rusty Russell
Acked-by: Nick Piggin
Signed-off-by: Al Viro -
seeing that "fast" symlinks still get allocation + copy, we might as
well simply switch them to pagecache-based variant of ->follow_link();
just need an appropriate ->readpage() for them...Signed-off-by: Al Viro
-
switch to generic_readlink(), while we are at it
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
little-endians...
Signed-off-by: Al Viro
-
annotate properly...
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Fix kernel-doc warnings in fs/inode.c:
Warning(fs/inode.c:1493): No description found for parameter 'path'
Warning(fs/inode.c:1493): Excess function parameter 'mnt' description in 'touch_atime'
Warning(fs/inode.c:1493): Excess function parameter 'dentry' description in 'touch_atime'Signed-off-by: Randy Dunlap
Signed-off-by: Al Viro -
a couple of le32 and le16 used with wrong le..._to_cpu(), plus
idiotic use of le32_to_cpu() on 1-bit bitfieldSigned-off-by: Al Viro
-
Signed-off-by: Al Viro
-
ocfs2_block_check is for little-endian contents; if we just want to
its fields converted to host-endian in a couple of functions, just
put those values into local u32 and u16...Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
... unused since 2.4.4.
Signed-off-by: Al Viro
-
In *all* callers we have a dentry of child of that directory.
Just use ->d_parent of that one, for fsck sake...Signed-off-by: Al Viro
-
a) %d does _not_ produce a page worth of output
b) snprintf() doesn't return negatives - it used to in old glibc, but
that's the kernel...Signed-off-by: Al Viro
-
Use parent_inode has a flag for whether nfsd wants a connectable fh, but
generate one opportunistically so that we can take advantage of the
additional info in there.Signed-off-by: Sage Weil
Signed-off-by: Al Viro -
pass inode + parent's inode or NULL instead of dentry + bool saying
whether we want the parent or not.NOTE: that needs ceph fix folded in.
Signed-off-by: Al Viro
-
don't open-code it...
Signed-off-by: Al Viro