Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 93b49d45 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (22 commits)
  Fix the race between capifs remount and node creation
  Fix races around the access to ->s_options
  switch ufs directories to ufs_sync_file()
  Switch open_exec() and sys_uselib() to do_open_filp()
  Make open_exec() and sys_uselib() use may_open(), instead of duplicating its parts
  Reduce path_lookup() abuses
  Make checkpatch.pl shut up on fs/inode.c
  NULL noise in fs/super.c:kill_bdev_super()
  romfs: cleanup romfs_fs.h
  ROMFS: romfs_dev_read() error ignored
  fs: dcache fix LRU ordering
  ocfs2: Use nd_set_link().
  Fix deadlock in ipathfs ->get_sb()
  Fix a leak in failure exit in 9p ->get_sb()
  Convert obvious places to deactivate_locked_super()
  New helper: deactivate_locked_super()
  reiserfs: remove privroot hiding in lookup
  reiserfs: dont associate security.* with xattr files
  reiserfs: fixup xattr_root caching
  Always lookup priv_root on reiserfs mount and keep it
  ...
parents f9f51cc0 b0c4f322
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -347,7 +347,7 @@ static int ipathfs_fill_super(struct super_block *sb, void *data,
		spin_unlock_irqrestore(&ipath_devs_lock, flags);
		ret = create_device_files(sb, dd);
		if (ret) {
			deactivate_super(sb);
			deactivate_locked_super(sb);
			goto bail;
		}
		spin_lock_irqsave(&ipath_devs_lock, flags);
+8 −3
Original line number Diff line number Diff line
@@ -75,15 +75,17 @@ static int capifs_remount(struct super_block *s, int *flags, char *data)
		}
	}

	kfree(s->s_options);
	s->s_options = new_opt;
	mutex_lock(&s->s_root->d_inode->i_mutex);

	replace_mount_options(s, new_opt);
	config.setuid  = setuid;
	config.setgid  = setgid;
	config.uid     = uid;
	config.gid     = gid;
	config.mode    = mode;

	mutex_unlock(&s->s_root->d_inode->i_mutex);

	return 0;
}

@@ -154,13 +156,16 @@ void capifs_new_ncci(unsigned int number, dev_t device)
	if (!inode)
		return;
	inode->i_ino = number+2;

	dentry = get_node(number);

	/* config contents is protected by root's i_mutex */
	inode->i_uid = config.setuid ? config.uid : current_fsuid();
	inode->i_gid = config.setgid ? config.gid : current_fsgid();
	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
	init_special_inode(inode, S_IFCHR|config.mode, device);
	//inode->i_op = &capifs_file_inode_operations;

	dentry = get_node(number);
	if (!IS_ERR(dentry) && !dentry->d_inode)
		d_instantiate(dentry, inode);
	mutex_unlock(&capifs_root->d_inode->i_mutex);
+1 −2
Original line number Diff line number Diff line
@@ -74,8 +74,7 @@ static int get_sb_mtd_aux(struct file_system_type *fs_type, int flags,

	ret = fill_super(sb, data, flags & MS_SILENT ? 1 : 0);
	if (ret < 0) {
		up_write(&sb->s_umount);
		deactivate_super(sb);
		deactivate_locked_super(sb);
		return ret;
	}

+10 −10
Original line number Diff line number Diff line
@@ -173,26 +173,26 @@ static const struct file_operations osd_fops = {
	.unlocked_ioctl = osd_uld_ioctl,
};

struct osd_dev *osduld_path_lookup(const char *path)
struct osd_dev *osduld_path_lookup(const char *name)
{
	struct nameidata nd;
	struct path path;
	struct inode *inode;
	struct cdev *cdev;
	struct osd_uld_device *uninitialized_var(oud);
	int error;

	if (!path || !*path) {
	if (!name || !*name) {
		OSD_ERR("Mount with !path || !*path\n");
		return ERR_PTR(-EINVAL);
	}

	error = path_lookup(path, LOOKUP_FOLLOW, &nd);
	error = kern_path(name, LOOKUP_FOLLOW, &path);
	if (error) {
		OSD_ERR("path_lookup of %s faild=>%d\n", path, error);
		OSD_ERR("path_lookup of %s failed=>%d\n", name, error);
		return ERR_PTR(error);
	}

	inode = nd.path.dentry->d_inode;
	inode = path.dentry->d_inode;
	error = -EINVAL; /* Not the right device e.g osd_uld_device */
	if (!S_ISCHR(inode->i_mode)) {
		OSD_DEBUG("!S_ISCHR()\n");
@@ -202,15 +202,15 @@ struct osd_dev *osduld_path_lookup(const char *path)
	cdev = inode->i_cdev;
	if (!cdev) {
		OSD_ERR("Before mounting an OSD Based filesystem\n");
		OSD_ERR("  user-mode must open+close the %s device\n", path);
		OSD_ERR("  Example: bash: echo < %s\n", path);
		OSD_ERR("  user-mode must open+close the %s device\n", name);
		OSD_ERR("  Example: bash: echo < %s\n", name);
		goto out;
	}

	/* The Magic wand. Is it our char-dev */
	/* TODO: Support sg devices */
	if (cdev->owner != THIS_MODULE) {
		OSD_ERR("Error mounting %s - is not an OSD device\n", path);
		OSD_ERR("Error mounting %s - is not an OSD device\n", name);
		goto out;
	}

@@ -220,7 +220,7 @@ struct osd_dev *osduld_path_lookup(const char *path)
	error = 0;

out:
	path_put(&nd.path);
	path_put(&path);
	return error ? ERR_PTR(error) : &oud->od;
}
EXPORT_SYMBOL(osduld_path_lookup);
+7 −5
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@
#include <linux/mount.h>
#include <linux/idr.h>
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <net/9p/9p.h>
#include <net/9p/client.h>

@@ -155,6 +156,7 @@ static int v9fs_get_sb(struct file_system_type *fs_type, int flags,

	root = d_alloc_root(inode);
	if (!root) {
		iput(inode);
		retval = -ENOMEM;
		goto release_sb;
	}
@@ -173,10 +175,7 @@ P9_DPRINTK(P9_DEBUG_VFS, " simple set mount, return 0\n");
	return 0;

release_sb:
	if (sb) {
		up_write(&sb->s_umount);
		deactivate_super(sb);
	}
	deactivate_locked_super(sb);

free_stat:
	kfree(st);
@@ -230,9 +229,12 @@ static int v9fs_show_options(struct seq_file *m, struct vfsmount *mnt)
static void
v9fs_umount_begin(struct super_block *sb)
{
	struct v9fs_session_info *v9ses = sb->s_fs_info;
	struct v9fs_session_info *v9ses;

	lock_kernel();
	v9ses = sb->s_fs_info;
	v9fs_session_cancel(v9ses);
	unlock_kernel();
}

static const struct super_operations v9fs_super_ops = {
Loading