Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/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
torvalds committed Jan 28, 2014
2 parents 54c0a4b + f650080 commit bf3d846
Show file tree
Hide file tree
Showing 179 changed files with 1,543 additions and 3,851 deletions.
2 changes: 1 addition & 1 deletion arch/blackfin/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions arch/cris/arch-v32/drivers/axisflashmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
4 changes: 2 additions & 2 deletions fs/9p/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 1 addition & 5 deletions fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions fs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
57 changes: 25 additions & 32 deletions fs/affs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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
Expand Down Expand Up @@ -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");
Expand Down
1 change: 0 additions & 1 deletion fs/afs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit bf3d846

Please sign in to comment.