Permalink
Browse files

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…

…/git/viro/vfs

Pull vfs updates from Al Viro:
 "Assorted stuff; the biggest pile here is Christoph's ACL series.  Plus
  assorted cleanups and fixes all over the place...

  There will be another pile later this week"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (43 commits)
  __dentry_path() fixes
  vfs: Remove second variable named error in __dentry_path
  vfs: Is mounted should be testing mnt_ns for NULL or error.
  Fix race when checking i_size on direct i/o read
  hfsplus: remove can_set_xattr
  nfsd: use get_acl and ->set_acl
  fs: remove generic_acl
  nfs: use generic posix ACL infrastructure for v3 Posix ACLs
  gfs2: use generic posix ACL infrastructure
  jfs: use generic posix ACL infrastructure
  xfs: use generic posix ACL infrastructure
  reiserfs: use generic posix ACL infrastructure
  ocfs2: use generic posix ACL infrastructure
  jffs2: use generic posix ACL infrastructure
  hfsplus: use generic posix ACL infrastructure
  f2fs: use generic posix ACL infrastructure
  ext2/3/4: use generic posix ACL infrastructure
  btrfs: use generic posix ACL infrastructure
  fs: make posix_acl_create more useful
  fs: make posix_acl_chmod more useful
  ...
  • Loading branch information...
2 parents 54c0a4b + f650080 commit bf3d846b783327359ddc4bd4f52627b36abb4d1d @torvalds committed Jan 28, 2014
Showing with 1,543 additions and 3,851 deletions.
  1. +1 −1 arch/blackfin/kernel/setup.c
  2. +0 −2 arch/cris/arch-v32/drivers/axisflashmap.c
  3. +2 −2 fs/9p/acl.c
  4. +1 −5 fs/Kconfig
  5. +1 −2 fs/Makefile
  6. +25 −32 fs/affs/super.c
  7. +0 −1 fs/afs/internal.h
  8. +22 −100 fs/afs/proc.c
  9. +2 −2 fs/befs/linuxvfs.c
  10. +18 −124 fs/btrfs/acl.c
  11. +2 −5 fs/btrfs/ctree.h
  12. +5 −2 fs/btrfs/inode.c
  13. +24 −46 fs/btrfs/ioctl.c
  14. +3 −2 fs/btrfs/xattr.c
  15. +0 −2 fs/btrfs/xattr.h
  16. +31 −19 fs/cramfs/inode.c
  17. +0 −6 include/linux/cramfs_fs.h → fs/cramfs/internal.h
  18. +1 −1 fs/cramfs/uncompress.c
  19. +6 −4 fs/dcache.c
  20. +13 −16 fs/ecryptfs/inode.c
  21. +15 −24 fs/efs/super.c
  22. +5 −8 fs/eventfd.c
  23. +14 −174 fs/ext2/acl.c
  24. +1 −7 fs/ext2/acl.h
  25. +1 −0 fs/ext2/file.c
  26. +1 −1 fs/ext2/inode.c
  27. +2 −0 fs/ext2/namei.c
  28. +4 −4 fs/ext2/xattr.c
  29. +0 −2 fs/ext2/xattr.h
  30. +29 −194 fs/ext3/acl.c
  31. +2 −7 fs/ext3/acl.h
  32. +1 −0 fs/ext3/file.c
  33. +1 −1 fs/ext3/inode.c
  34. +2 −0 fs/ext3/namei.c
  35. +4 −4 fs/ext3/xattr.c
  36. +0 −2 fs/ext3/xattr.h
  37. +28 −195 fs/ext4/acl.c
  38. +2 −7 fs/ext4/acl.h
  39. +1 −0 fs/ext4/file.c
  40. +1 −1 fs/ext4/inode.c
  41. +2 −0 fs/ext4/namei.c
  42. +4 −4 fs/ext4/xattr.c
  43. +0 −2 fs/ext4/xattr.h
  44. +17 −157 fs/f2fs/acl.c
  45. +1 −6 fs/f2fs/acl.h
  46. +4 −0 fs/f2fs/f2fs.h
  47. +2 −1 fs/f2fs/file.c
  48. +2 −0 fs/f2fs/namei.c
  49. +5 −4 fs/f2fs/xattr.c
  50. +0 −2 fs/f2fs/xattr.h
  51. +29 −69 fs/file.c
  52. +3 −0 fs/fuse/file.c
  53. +0 −184 fs/generic_acl.c
  54. +30 −204 fs/gfs2/acl.c
  55. +1 −3 fs/gfs2/acl.h
  56. +28 −6 fs/gfs2/inode.c
  57. +3 −1 fs/gfs2/xattr.c
  58. +3 −6 fs/hfsplus/acl.h
  59. +1 −0 fs/hfsplus/dir.c
  60. +2 −1 fs/hfsplus/inode.c
  61. +17 −151 fs/hfsplus/posix_acl.c
  62. +6 −86 fs/hfsplus/xattr.c
  63. +0 −2 fs/hfsplus/xattr.h
  64. +11 −130 fs/jffs2/acl.c
  65. +2 −5 fs/jffs2/acl.h
  66. +1 −0 fs/jffs2/dir.c
  67. +1 −0 fs/jffs2/file.c
  68. +4 −3 fs/jffs2/fs.c
  69. +0 −1 fs/jffs2/symlink.c
  70. +5 −4 fs/jffs2/xattr.c
  71. +42 −63 fs/jfs/acl.c
  72. +3 −1 fs/jfs/file.c
  73. +1 −6 fs/jfs/jfs_acl.h
  74. +2 −0 fs/jfs/jfs_xattr.h
  75. +1 −0 fs/jfs/namei.c
  76. +2 −0 fs/jfs/super.c
  77. +38 −70 fs/jfs/xattr.c
  78. +1 −1 fs/mount.h
  79. +3 −21 fs/namei.c
  80. +0 −4 fs/nfs/inode.c
  81. +55 −236 fs/nfs/nfs3acl.c
  82. +52 −24 fs/nfs/nfs3proc.c
  83. +3 −0 fs/nfs/nfs3super.c
  84. +7 −9 fs/nfsd/acl.h
  85. +40 −32 fs/nfsd/nfs2acl.c
  86. +33 −29 fs/nfsd/nfs3acl.c
  87. +92 −28 fs/nfsd/nfs4acl.c
  88. +1 −0 fs/nfsd/nfs4proc.c
  89. +0 −241 fs/nfsd/vfs.c
  90. +0 −8 fs/nfsd/vfs.h
  91. +0 −1 fs/nls/mac-celtic.c
  92. +0 −1 fs/nls/mac-centeuro.c
  93. +0 −1 fs/nls/mac-croatian.c
  94. +0 −1 fs/nls/mac-cyrillic.c
  95. +0 −1 fs/nls/mac-gaelic.c
  96. +0 −1 fs/nls/mac-greek.c
  97. +0 −1 fs/nls/mac-iceland.c
  98. +0 −1 fs/nls/mac-inuit.c
  99. +0 −1 fs/nls/mac-roman.c
  100. +0 −1 fs/nls/mac-romanian.c
  101. +0 −1 fs/nls/mac-turkish.c
  102. +0 −1 fs/nls/nls_ascii.c
  103. +3 −2 fs/nls/nls_base.c
  104. +0 −1 fs/nls/nls_cp1250.c
  105. +0 −1 fs/nls/nls_cp1251.c
  106. +0 −1 fs/nls/nls_cp1255.c
  107. +0 −1 fs/nls/nls_cp437.c
  108. +0 −1 fs/nls/nls_cp737.c
  109. +0 −1 fs/nls/nls_cp775.c
  110. +0 −1 fs/nls/nls_cp850.c
  111. +0 −1 fs/nls/nls_cp852.c
  112. +0 −1 fs/nls/nls_cp855.c
  113. +0 −1 fs/nls/nls_cp857.c
  114. +0 −1 fs/nls/nls_cp860.c
  115. +0 −1 fs/nls/nls_cp861.c
  116. +0 −1 fs/nls/nls_cp862.c
  117. +0 −1 fs/nls/nls_cp863.c
  118. +0 −1 fs/nls/nls_cp864.c
  119. +0 −1 fs/nls/nls_cp865.c
  120. +0 −1 fs/nls/nls_cp866.c
  121. +0 −1 fs/nls/nls_cp869.c
  122. +0 −1 fs/nls/nls_cp874.c
  123. +0 −1 fs/nls/nls_cp932.c
  124. +0 −1 fs/nls/nls_cp936.c
  125. +0 −1 fs/nls/nls_cp949.c
  126. +0 −1 fs/nls/nls_cp950.c
  127. +0 −1 fs/nls/nls_euc-jp.c
  128. +0 −1 fs/nls/nls_iso8859-1.c
  129. +0 −1 fs/nls/nls_iso8859-13.c
  130. +0 −1 fs/nls/nls_iso8859-14.c
  131. +0 −1 fs/nls/nls_iso8859-15.c
  132. +0 −1 fs/nls/nls_iso8859-2.c
  133. +0 −1 fs/nls/nls_iso8859-3.c
  134. +0 −1 fs/nls/nls_iso8859-4.c
  135. +0 −1 fs/nls/nls_iso8859-5.c
  136. +0 −1 fs/nls/nls_iso8859-6.c
  137. +0 −1 fs/nls/nls_iso8859-7.c
  138. +0 −1 fs/nls/nls_iso8859-9.c
  139. +0 −1 fs/nls/nls_koi8-r.c
  140. +0 −1 fs/nls/nls_koi8-ru.c
  141. +0 −1 fs/nls/nls_koi8-u.c
  142. +0 −1 fs/nls/nls_utf8.c
  143. +6 −228 fs/ocfs2/acl.c
  144. +8 −5 fs/ocfs2/acl.h
  145. +3 −1 fs/ocfs2/file.c
  146. +23 −2 fs/ocfs2/namei.c
  147. +17 −2 fs/ocfs2/refcounttree.c
  148. +12 −9 fs/ocfs2/xattr.c
  149. +3 −3 fs/ocfs2/xattr.h
  150. +416 −12 fs/posix_acl.c
  151. +22 −41 fs/qnx4/inode.c
  152. +0 −2 fs/qnx4/qnx4.h
  153. +2 −2 fs/reiserfs/acl.h
  154. +1 −0 fs/reiserfs/file.c
  155. +2 −2 fs/reiserfs/namei.c
  156. +2 −2 fs/reiserfs/procfs.c
  157. +0 −8 fs/reiserfs/reiserfs.h
  158. +4 −4 fs/reiserfs/super.c
  159. +3 −2 fs/reiserfs/xattr.c
  160. +31 −159 fs/reiserfs/xattr_acl.c
  161. +0 −180 fs/xattr_acl.c
  162. +8 −143 fs/xfs/xfs_acl.c
  163. +2 −7 fs/xfs/xfs_acl.h
  164. +24 −31 fs/xfs/xfs_iops.c
  165. +1 −1 fs/xfs/xfs_iops.h
  166. +2 −2 fs/xfs/xfs_xattr.c
  167. +0 −20 include/linux/cramfs_fs_sb.h
  168. +21 −14 include/linux/fdtable.h
  169. +1 −0 include/linux/fs.h
  170. +0 −14 include/linux/generic_acl.h
  171. +7 −17 include/linux/nfs_fs.h
  172. +2 −1 include/linux/nls.h
  173. +39 −4 include/linux/posix_acl.h
  174. +3 −0 include/linux/posix_acl_xattr.h
  175. +0 −2 include/linux/rcupdate.h
  176. +1 −1 init/do_mounts_rd.c
  177. +0 −11 kernel/rcu/update.c
  178. +20 −22 mm/filemap.c
  179. +23 −34 mm/shmem.c
@@ -17,7 +17,7 @@
#ifdef CONFIG_MTD_UCLINUX
#include <linux/mtd/map.h>
#include <linux/ext2_fs.h>
-#include <linux/cramfs_fs.h>
+#include <uapi/linux/cramfs_fs.h>
#include <linux/romfs_fs.h>
#endif
@@ -24,8 +24,6 @@
#include <linux/mtd/mtdram.h>
#include <linux/mtd/partitions.h>
-#include <linux/cramfs_fs.h>
-
#include <asm/axisflashmap.h>
#include <asm/mmu.h>
View
@@ -156,7 +156,7 @@ int v9fs_acl_chmod(struct inode *inode, struct p9_fid *fid)
return -EOPNOTSUPP;
acl = v9fs_get_cached_acl(inode, ACL_TYPE_ACCESS);
if (acl) {
- retval = posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
+ retval = __posix_acl_chmod(&acl, GFP_KERNEL, inode->i_mode);
if (retval)
return retval;
set_cached_acl(inode, ACL_TYPE_ACCESS, acl);
@@ -200,7 +200,7 @@ int v9fs_acl_mode(struct inode *dir, umode_t *modep,
if (acl) {
if (S_ISDIR(mode))
*dpacl = posix_acl_dup(acl);
- retval = posix_acl_create(&acl, GFP_NOFS, &mode);
+ retval = __posix_acl_create(&acl, GFP_NOFS, &mode);
if (retval < 0)
return retval;
if (retval > 0)
View
@@ -68,10 +68,6 @@ source "fs/quota/Kconfig"
source "fs/autofs4/Kconfig"
source "fs/fuse/Kconfig"
-config GENERIC_ACL
- bool
- select FS_POSIX_ACL
-
menu "Caches"
source "fs/fscache/Kconfig"
@@ -119,7 +115,7 @@ config TMPFS_POSIX_ACL
bool "Tmpfs POSIX Access Control Lists"
depends on TMPFS
select TMPFS_XATTR
- select GENERIC_ACL
+ select FS_POSIX_ACL
help
POSIX Access Control Lists (ACLs) support additional access rights
for users and groups beyond the standard owner/group/world scheme,
View
@@ -42,9 +42,8 @@ obj-$(CONFIG_BINFMT_SOM) += binfmt_som.o
obj-$(CONFIG_BINFMT_FLAT) += binfmt_flat.o
obj-$(CONFIG_FS_MBCACHE) += mbcache.o
-obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o xattr_acl.o
+obj-$(CONFIG_FS_POSIX_ACL) += posix_acl.o
obj-$(CONFIG_NFS_COMMON) += nfs_common/
-obj-$(CONFIG_GENERIC_ACL) += generic_acl.o
obj-$(CONFIG_COREDUMP) += coredump.o
obj-$(CONFIG_SYSCTL) += drop_caches.o
View
@@ -49,11 +49,6 @@ affs_put_super(struct super_block *sb)
pr_debug("AFFS: put_super()\n");
cancel_delayed_work_sync(&sbi->sb_work);
- kfree(sbi->s_prefix);
- affs_free_bitmap(sb);
- affs_brelse(sbi->s_root_bh);
- kfree(sbi);
- sb->s_fs_info = NULL;
}
static int
@@ -316,7 +311,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
unsigned long mount_flags;
int tmp_flags; /* fix remount prototype... */
u8 sig[4];
- int ret = -EINVAL;
+ int ret;
save_mount_options(sb, data);
@@ -412,17 +407,19 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
if (!silent)
printk(KERN_ERR "AFFS: No valid root block on device %s\n",
sb->s_id);
- goto out_error;
+ return -EINVAL;
/* N.B. after this point bh must be released */
got_root:
+ /* Keep super block in cache */
+ sbi->s_root_bh = root_bh;
root_block = sbi->s_root_block;
/* Find out which kind of FS we have */
boot_bh = sb_bread(sb, 0);
if (!boot_bh) {
printk(KERN_ERR "AFFS: Cannot read boot block\n");
- goto out_error;
+ return -EINVAL;
}
memcpy(sig, boot_bh->b_data, 4);
brelse(boot_bh);
@@ -471,7 +468,7 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
default:
printk(KERN_ERR "AFFS: Unknown filesystem on device %s: %08X\n",
sb->s_id, chksum);
- goto out_error;
+ return -EINVAL;
}
if (mount_flags & SF_VERBOSE) {
@@ -488,22 +485,17 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
if (sbi->s_flags & SF_OFS)
sbi->s_data_blksize -= 24;
- /* Keep super block in cache */
- sbi->s_root_bh = root_bh;
- /* N.B. after this point s_root_bh must be released */
-
tmp_flags = sb->s_flags;
- if (affs_init_bitmap(sb, &tmp_flags))
- goto out_error;
+ ret = affs_init_bitmap(sb, &tmp_flags);
+ if (ret)
+ return ret;
sb->s_flags = tmp_flags;
/* set up enough so that it can read an inode */
root_inode = affs_iget(sb, root_block);
- if (IS_ERR(root_inode)) {
- ret = PTR_ERR(root_inode);
- goto out_error;
- }
+ if (IS_ERR(root_inode))
+ return PTR_ERR(root_inode);
if (AFFS_SB(sb)->s_flags & SF_INTL)
sb->s_d_op = &affs_intl_dentry_operations;
@@ -513,22 +505,11 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent)
sb->s_root = d_make_root(root_inode);
if (!sb->s_root) {
printk(KERN_ERR "AFFS: Get root inode failed\n");
- goto out_error;
+ return -ENOMEM;
}
pr_debug("AFFS: s_flags=%lX\n",sb->s_flags);
return 0;
-
- /*
- * Begin the cascaded cleanup ...
- */
-out_error:
- kfree(sbi->s_bitmap);
- affs_brelse(root_bh);
- kfree(sbi->s_prefix);
- kfree(sbi);
- sb->s_fs_info = NULL;
- return ret;
}
static int
@@ -615,11 +596,23 @@ static struct dentry *affs_mount(struct file_system_type *fs_type,
return mount_bdev(fs_type, flags, dev_name, data, affs_fill_super);
}
+static void affs_kill_sb(struct super_block *sb)
+{
+ struct affs_sb_info *sbi = AFFS_SB(sb);
+ kill_block_super(sb);
+ if (sbi) {
+ affs_free_bitmap(sb);
+ affs_brelse(sbi->s_root_bh);
+ kfree(sbi->s_prefix);
+ kfree(sbi);
+ }
+}
+
static struct file_system_type affs_fs_type = {
.owner = THIS_MODULE,
.name = "affs",
.mount = affs_mount,
- .kill_sb = kill_block_super,
+ .kill_sb = affs_kill_sb,
.fs_flags = FS_REQUIRES_DEV,
};
MODULE_ALIAS_FS("affs");
View
@@ -195,7 +195,6 @@ struct afs_cell {
struct list_head link; /* main cell list link */
struct key *anonymous_key; /* anonymous user key for this cell */
struct list_head proc_link; /* /proc cell list link */
- struct proc_dir_entry *proc_dir; /* /proc dir for this cell */
#ifdef CONFIG_AFS_FSCACHE
struct fscache_cookie *cache; /* caching cookie */
#endif
Oops, something went wrong.

0 comments on commit bf3d846

Please sign in to comment.