]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Aug 2010 18:26:52 +0000 (11:26 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 10 Aug 2010 18:26:52 +0000 (11:26 -0700)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (96 commits)
  no need for list_for_each_entry_safe()/resetting with superblock list
  Fix sget() race with failing mount
  vfs: don't hold s_umount over close_bdev_exclusive() call
  sysv: do not mark superblock dirty on remount
  sysv: do not mark superblock dirty on mount
  btrfs: remove junk sb_dirt change
  BFS: clean up the superblock usage
  AFFS: wait for sb synchronization when needed
  AFFS: clean up dirty flag usage
  cifs: truncate fallout
  mbcache: fix shrinker function return value
  mbcache: Remove unused features
  add f_flags to struct statfs(64)
  pass a struct path to vfs_statfs
  update VFS documentation for method changes.
  All filesystems that need invalidate_inode_buffers() are doing that explicitly
  convert remaining ->clear_inode() to ->evict_inode()
  Make ->drop_inode() just return whether inode needs to be dropped
  fs/inode.c:clear_inode() is gone
  fs/inode.c:evict() doesn't care about delete vs. non-delete paths now
  ...

Fix up trivial conflicts in fs/nilfs2/super.c

44 files changed:
1  2 
drivers/staging/pohmelfs/inode.c
fs/9p/v9fs_vfs.h
fs/9p/vfs_inode.c
fs/9p/vfs_super.c
fs/block_dev.c
fs/cifs/cifsfs.c
fs/cifs/inode.c
fs/compat.c
fs/ext3/inode.c
fs/ext3/super.c
fs/ext4/ext4.h
fs/ext4/ialloc.c
fs/ext4/inode.c
fs/ext4/super.c
fs/ext4/xattr.c
fs/freevxfs/vxfs_super.c
fs/fs-writeback.c
fs/fuse/dir.c
fs/gfs2/aops.c
fs/gfs2/super.c
fs/ncpfs/inode.c
fs/nfs/inode.c
fs/nfs/internal.h
fs/nfs/super.c
fs/nfsd/nfs4xdr.c
fs/nfsd/vfs.c
fs/nilfs2/dir.c
fs/nilfs2/nilfs.h
fs/nilfs2/recovery.c
fs/nilfs2/super.c
fs/ocfs2/dlmfs/dlmfs.c
fs/ocfs2/super.c
fs/proc/base.c
fs/quota/dquot.c
fs/reiserfs/inode.c
fs/ubifs/super.c
fs/udf/file.c
fs/udf/super.c
include/linux/buffer_head.h
include/linux/ext3_fs.h
include/linux/fs.h
include/linux/mm.h
include/linux/reiserfs_fs.h
mm/shmem.c

Simple merge
index f47c6bbb01b308115eedf8cb228e5dc694fe6560,3d056fe01b508ceb39864fcf14bebfb1b421dac1..88418c419ea7e70269572372d60eff91c6a4171c
@@@ -52,10 -52,9 +52,10 @@@ void v9fs_destroy_inode(struct inode *i
  #endif
  
  struct inode *v9fs_get_inode(struct super_block *sb, int mode);
- void v9fs_clear_inode(struct inode *inode);
+ void v9fs_evict_inode(struct inode *inode);
  ino_t v9fs_qid2ino(struct p9_qid *qid);
  void v9fs_stat2inode(struct p9_wstat *, struct inode *, struct super_block *);
 +void v9fs_stat2inode_dotl(struct p9_stat_dotl *, struct inode *);
  int v9fs_dir_release(struct inode *inode, struct file *filp);
  int v9fs_file_open(struct inode *inode, struct file *file);
  void v9fs_inode2stat(struct inode *inode, struct p9_wstat *stat);
index 6e94f3247cec5fb7e354583c31ded72254a3b623,b81ce206508d7c3c04b1cdd054e5d2472b61a71b..d97c34a24f7a32b26f8b983d71fac6ac7598f522
@@@ -1209,55 -898,21 +1211,64 @@@ static int v9fs_vfs_setattr(struct dent
        }
  
        retval = p9_client_wstat(fid, &wstat);
-       if (retval >= 0)
-               retval = inode_setattr(dentry->d_inode, iattr);
+       if (retval < 0)
+               return retval;
  
-       return retval;
+       if ((iattr->ia_valid & ATTR_SIZE) &&
+           iattr->ia_size != i_size_read(dentry->d_inode)) {
+               retval = vmtruncate(dentry->d_inode, iattr->ia_size);
+               if (retval)
+                       return retval;
+       }
+       setattr_copy(dentry->d_inode, iattr);
+       mark_inode_dirty(dentry->d_inode);
+       return 0;
  }
  
 +/**
 + * v9fs_vfs_setattr_dotl - set file metadata
 + * @dentry: file whose metadata to set
 + * @iattr: metadata assignment structure
 + *
 + */
 +
 +static int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr)
 +{
 +      int retval;
 +      struct v9fs_session_info *v9ses;
 +      struct p9_fid *fid;
 +      struct p9_iattr_dotl p9attr;
 +
 +      P9_DPRINTK(P9_DEBUG_VFS, "\n");
 +
 +      retval = inode_change_ok(dentry->d_inode, iattr);
 +      if (retval)
 +              return retval;
 +
 +      p9attr.valid = iattr->ia_valid;
 +      p9attr.mode = iattr->ia_mode;
 +      p9attr.uid = iattr->ia_uid;
 +      p9attr.gid = iattr->ia_gid;
 +      p9attr.size = iattr->ia_size;
 +      p9attr.atime_sec = iattr->ia_atime.tv_sec;
 +      p9attr.atime_nsec = iattr->ia_atime.tv_nsec;
 +      p9attr.mtime_sec = iattr->ia_mtime.tv_sec;
 +      p9attr.mtime_nsec = iattr->ia_mtime.tv_nsec;
 +
 +      retval = -EPERM;
 +      v9ses = v9fs_inode2v9ses(dentry->d_inode);
 +      fid = v9fs_fid_lookup(dentry);
 +      if (IS_ERR(fid))
 +              return PTR_ERR(fid);
 +
 +      retval = p9_client_setattr(fid, &p9attr);
 +      if (retval >= 0)
 +              retval = inode_setattr(dentry->d_inode, iattr);
 +
 +      return retval;
 +}
 +
  /**
   * v9fs_stat2inode - populate an inode structure with mistat info
   * @stat: Plan 9 metadata (mistat) structure
Simple merge
diff --cc fs/block_dev.c
Simple merge
Simple merge
diff --cc fs/cifs/inode.c
Simple merge
diff --cc fs/compat.c
Simple merge
diff --cc fs/ext3/inode.c
Simple merge
diff --cc fs/ext3/super.c
Simple merge
diff --cc fs/ext4/ext4.h
Simple merge
Simple merge
diff --cc fs/ext4/inode.c
Simple merge
diff --cc fs/ext4/super.c
Simple merge
diff --cc fs/ext4/xattr.c
Simple merge
Simple merge
Simple merge
diff --cc fs/fuse/dir.c
Simple merge
diff --cc fs/gfs2/aops.c
Simple merge
diff --cc fs/gfs2/super.c
Simple merge
Simple merge
diff --cc fs/nfs/inode.c
Simple merge
Simple merge
diff --cc fs/nfs/super.c
Simple merge
Simple merge
diff --cc fs/nfsd/vfs.c
Simple merge
diff --cc fs/nilfs2/dir.c
index b60277b4446871dcc10f36a2ede58a47694df311,d14e3b94d81fb4f58376dfa0a08b09f769fa136d..cb003c8ee1f6d9f839bd78f2a3c182086d629645
@@@ -586,10 -574,10 +573,10 @@@ int nilfs_delete_entry(struct nilfs_dir
        if (pde)
                from = (char *)pde - (char *)page_address(page);
        lock_page(page);
-       err = nilfs_prepare_chunk(page, mapping, from, to);
+       err = nilfs_prepare_chunk(page, from, to);
        BUG_ON(err);
        if (pde)
 -              pde->rec_len = cpu_to_le16(to - from);
 +              pde->rec_len = nilfs_rec_len_to_disk(to - from);
        dir->inode = 0;
        nilfs_commit_chunk(page, mapping, from, to);
        inode->i_ctime = inode->i_mtime = CURRENT_TIME;
Simple merge
index 83e3d8c61a01c8244d8bb01d8f10de0ad909792a,2f11f0868d877e4898bbd3e7e0a93ec73e5926e2..d0c35ef39f6adf7bf04acfce6754739b60421d61
@@@ -523,13 -505,16 +523,16 @@@ static int nilfs_recover_dsync_blocks(s
                }
  
                pos = rb->blkoff << inode->i_blkbits;
-               page = NULL;
-               err = block_write_begin(NULL, inode->i_mapping, pos, blocksize,
-                                       0, &page, NULL, nilfs_get_block);
-               if (unlikely(err))
+               err = block_write_begin(inode->i_mapping, pos, blocksize,
+                                       0, &page, nilfs_get_block);
+               if (unlikely(err)) {
+                       loff_t isize = inode->i_size;
+                       if (pos + blocksize > isize)
+                               vmtruncate(inode, isize);
                        goto failed_inode;
+               }
  
 -              err = nilfs_recovery_copy_block(sbi, rb, page);
 +              err = nilfs_recovery_copy_block(nilfs, rb, page);
                if (unlikely(err))
                        goto failed_page;
  
index 26078b3407c9a15e8a473e80536e25bcb6baefe0,7c7572a4e13883ffae05711026e0be02e4b855b4..1fa86b9df73b4c885190b6b3bbf95291b7630d4e
@@@ -171,24 -159,7 +171,7 @@@ void nilfs_destroy_inode(struct inode *
        kmem_cache_free(nilfs_inode_cachep, NILFS_I(inode));
  }
  
- static void nilfs_clear_inode(struct inode *inode)
- {
-       struct nilfs_inode_info *ii = NILFS_I(inode);
-       /*
-        * Free resources allocated in nilfs_read_inode(), here.
-        */
-       BUG_ON(!list_empty(&ii->i_dirty));
-       brelse(ii->i_bh);
-       ii->i_bh = NULL;
-       if (test_bit(NILFS_I_BMAP, &ii->i_state))
-               nilfs_bmap_clear(ii->i_bmap);
-       nilfs_btnode_cache_clear(&ii->i_btnode_cache);
- }
 -static int nilfs_sync_super(struct nilfs_sb_info *sbi, int dupsb)
 +static int nilfs_sync_super(struct nilfs_sb_info *sbi, int flag)
  {
        struct the_nilfs *nilfs = sbi->s_nilfs;
        int err;
Simple merge
Simple merge
diff --cc fs/proc/base.c
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/udf/file.c
Simple merge
diff --cc fs/udf/super.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc mm/shmem.c
Simple merge