1. 01 Aug, 2011 4 commits
  2. 30 Jul, 2011 3 commits
    • Dan Carpenter's avatar
      ext4: add missing kfree() on error return path in add_new_gdb() · c49bafa3
      Dan Carpenter authored
      We added some more error handling in b4097142 "ext4: add error
      checking to calls to ext4_handle_dirty_metadata()".  But we need to
      call kfree() as well to avoid a memory leak.
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      c49bafa3
    • Theodore Ts'o's avatar
      ext4: change umode_t in tracepoint headers to be an explicit __u16 · 59be8e72
      Theodore Ts'o authored
      As requested by Al Viro, since umode_t may be changing to a u32 for
      some architectures.
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      Cc: Al Viro <viro@ZenIV.linux.org.uk>
      59be8e72
    • Theodore Ts'o's avatar
      ext4: fix races in ext4_sync_parent() · d59729f4
      Theodore Ts'o authored
      Fix problems if fsync() races against a rename of a parent directory
      as pointed out by Al Viro in his own inimitable way:
      
      >While we are at it, could somebody please explain what the hell is ext4
      >doing in
      >static int ext4_sync_parent(struct inode *inode)
      >{
      >        struct writeback_control wbc;
      >        struct dentry *dentry = NULL;
      >        int ret = 0;
      >
      >        while (inode && ext4_test_inode_state(inode, EXT4_STATE_NEWENTRY)) {
      >                ext4_clear_inode_state(inode, EXT4_STATE_NEWENTRY);
      >                dentry = list_entry(inode->i_dentry.next,
      >                                    struct dentry, d_alias);
      >                if (!dentry || !dentry->d_parent || !dentry->d_parent->d_inode)
      >                        break;
      >                inode = dentry->d_parent->d_inode;
      >                ret = sync_mapping_buffers(inode->i_mapping);
      >                ...
      >Note that dentry obviously can't be NULL there.  dentry->d_parent is never
      >NULL.  And dentry->d_parent would better not be negative, for crying out
      >loud!  What's worse, there's no guarantees that dentry->d_parent will
      >remain our parent over that sync_mapping_buffers() *and* that inode won't
      >just be freed under us (after rename() and memory pressure leading to
      >eviction of what used to be our dentry->d_parent)......
      Reported-by: default avatarAl Viro <viro@ZenIV.linux.org.uk>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      d59729f4
  3. 28 Jul, 2011 5 commits
  4. 27 Jul, 2011 8 commits
  5. 26 Jul, 2011 1 commit
    • Jan Kara's avatar
      ext4: fix data corruption in inodes with journalled data · 2d859db3
      Jan Kara authored
      When journalling data for an inode (either because it is a symlink or
      because the filesystem is mounted in data=journal mode), ext4_evict_inode()
      can discard unwritten data by calling truncate_inode_pages(). This is
      because we don't mark the buffer / page dirty when journalling data but only
      add the buffer to the running transaction and thus mm does not know there
      are still unwritten data.
      
      Fix the problem by carefully tracking transaction containing inode's data,
      committing this transaction, and writing uncheckpointed buffers when inode
      should be reaped.
      Signed-off-by: default avatarJan Kara <jack@suse.cz>
      Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
      2d859db3
  6. 24 Jul, 2011 3 commits
  7. 23 Jul, 2011 3 commits
  8. 18 Jul, 2011 6 commits
  9. 16 Jul, 2011 1 commit
  10. 11 Jul, 2011 6 commits