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

    Dmitry Kasatkin
     
  • 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

    Shai Fultheim
     
  • 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

    Cong Wang
     
  • 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

    Artem Bityutskiy
     
  • 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

    Artem Bityutskiy
     
  • 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

    Artem Bityutskiy
     
  • We do not need 'lock_super()'/'unlock_super()' in JFFS2 - kill them.

    Signed-off-by: Artem Bityutskiy
    Signed-off-by: Al Viro

    Artem Bityutskiy
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     
  • Signed-off-by: Al Viro

    Al Viro
     

30 May, 2012

30 commits