Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs...
Linus Torvalds [Wed, 2 Nov 2011 18:41:01 +0000 (11:41 -0700)]
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue:
  vfs: add d_prune dentry operation
  vfs: protect i_nlink
  filesystems: add set_nlink()
  filesystems: add missing nlink wrappers
  logfs: remove unnecessary nlink setting
  ocfs2: remove unnecessary nlink setting
  jfs: remove unnecessary nlink setting
  hypfs: remove unnecessary nlink setting
  vfs: ignore error on forced remount
  readlinkat: ensure we return ENOENT for the empty pathname for normal lookups
  vfs: fix dentry leak in simple_fill_super()

1  2 
fs/ext3/ialloc.c
fs/ext4/ialloc.c
fs/ext4/inode.c
fs/ext4/migrate.c
fs/ext4/namei.c
fs/udf/inode.c
fs/udf/namei.c
include/linux/fs.h

Simple merge
Simple merge
diff --cc fs/ext4/inode.c
Simple merge
Simple merge
diff --cc fs/ext4/namei.c
@@@ -1860,9 -1861,9 +1860,9 @@@ retry
        de->name_len = 2;
        strcpy(de->name, "..");
        ext4_set_de_type(dir->i_sb, de, S_IFDIR);
-       inode->i_nlink = 2;
+       set_nlink(inode, 2);
        BUFFER_TRACE(dir_block, "call ext4_handle_dirty_metadata");
 -      err = ext4_handle_dirty_metadata(handle, dir, dir_block);
 +      err = ext4_handle_dirty_metadata(handle, inode, dir_block);
        if (err)
                goto out_clear_inode;
        err = ext4_mark_inode_dirty(handle, inode);
diff --cc fs/udf/inode.c
Simple merge
diff --cc fs/udf/namei.c
Simple merge
@@@ -768,8 -768,19 +768,18 @@@ struct inode 
  
        /* Stat data, not accessed from path walking */
        unsigned long           i_ino;
-       unsigned int            i_nlink;
+       /*
+        * Filesystems may only read i_nlink directly.  They shall use the
+        * following functions for modification:
+        *
+        *    (set|clear|inc|drop)_nlink
+        *    inode_(inc|dec)_link_count
+        */
+       union {
+               const unsigned int i_nlink;
+               unsigned int __i_nlink;
+       };
        dev_t                   i_rdev;
 -      loff_t                  i_size;
        struct timespec         i_atime;
        struct timespec         i_mtime;
        struct timespec         i_ctime;