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

Commit ecb5ec04 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull vfs pile #3 from Al Viro:
 "Assorted fixes and patches from the last cycle"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  [regression] chunk lost from bd9b51
  vfs: make mounts and mountstats honor root dir like mountinfo does
  vfs: cleanup show_mountinfo
  init: fix read-write root mount
  unfuck binfmt_misc.c (broken by commit e6084d4a)
  vm_area_operations: kill ->migrate()
  new helper: iter_is_iovec()
  move_extent_per_page(): get rid of unused w_flags
  lustre: get rid of playing with ->fs
  btrfs: filp_open() returns ERR_PTR() on failure, not NULL...
parents 298647e3 e3bb504e
Loading
Loading
Loading
Loading
+0 −24
Original line number Diff line number Diff line
@@ -42,28 +42,6 @@

#include "lustre_patchless_compat.h"

# define LOCK_FS_STRUCT(fs)	spin_lock(&(fs)->lock)
# define UNLOCK_FS_STRUCT(fs)	spin_unlock(&(fs)->lock)

static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
				 struct dentry *dentry)
{
	struct path path;
	struct path old_pwd;

	path.mnt = mnt;
	path.dentry = dentry;
	LOCK_FS_STRUCT(fs);
	old_pwd = fs->pwd;
	path_get(&path);
	fs->pwd = path;
	UNLOCK_FS_STRUCT(fs);

	if (old_pwd.dentry)
		path_put(&old_pwd);
}


/*
 * set ATTR_BLOCKS to a high value to avoid any risk of collision with other
 * ATTR_* attributes (see bug 13828)
@@ -110,8 +88,6 @@ static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
#define cfs_bio_io_error(a, b)   bio_io_error((a))
#define cfs_bio_endio(a, b, c)    bio_endio((a), (c))

#define cfs_fs_pwd(fs)       ((fs)->pwd.dentry)
#define cfs_fs_mnt(fs)       ((fs)->pwd.mnt)
#define cfs_path_put(nd)     path_put(&(nd)->path)


+1 −1
Original line number Diff line number Diff line
@@ -661,7 +661,7 @@ int ll_dir_setdirstripe(struct inode *dir, struct lmv_user_md *lump,
	int mode;
	int err;

	mode = (0755 & (S_IRWXUGO|S_ISVTX) & ~current->fs->umask) | S_IFDIR;
	mode = (0755 & ~current_umask()) | S_IFDIR;
	op_data = ll_prep_md_op_data(NULL, dir, NULL, filename,
				     strlen(filename), mode, LUSTRE_OPC_MKDIR,
				     lump);
+1 −16
Original line number Diff line number Diff line
@@ -2372,21 +2372,6 @@ char *ll_get_fsname(struct super_block *sb, char *buf, int buflen)
	return buf;
}

static char *ll_d_path(struct dentry *dentry, char *buf, int bufsize)
{
	char *path = NULL;

	struct path p;

	p.dentry = dentry;
	p.mnt = current->fs->root.mnt;
	path_get(&p);
	path = d_path(&p, buf, bufsize);
	path_put(&p);

	return path;
}

void ll_dirty_page_discard_warn(struct page *page, int ioret)
{
	char *buf, *path = NULL;
@@ -2398,7 +2383,7 @@ void ll_dirty_page_discard_warn(struct page *page, int ioret)
	if (buf != NULL) {
		dentry = d_find_alias(page->mapping->host);
		if (dentry != NULL)
			path = ll_d_path(dentry, buf, PAGE_SIZE);
			path = dentry_path_raw(dentry, buf, PAGE_SIZE);
	}

	CDEBUG(D_WARNING,
+3 −4
Original line number Diff line number Diff line
@@ -254,6 +254,7 @@ static char *scanarg(char *s, char del)
				return NULL;
		}
	}
	s[-1] ='\0';
	return s;
}

@@ -378,8 +379,7 @@ static Node *create_entry(const char __user *buffer, size_t count)
		p = scanarg(p, del);
		if (!p)
			goto einval;
		p[-1] = '\0';
		if (p == e->magic)
		if (!e->magic[0])
			goto einval;
		if (USE_DEBUG)
			print_hex_dump_bytes(
@@ -391,8 +391,7 @@ static Node *create_entry(const char __user *buffer, size_t count)
		p = scanarg(p, del);
		if (!p)
			goto einval;
		p[-1] = '\0';
		if (p == e->mask) {
		if (!e->mask[0]) {
			e->mask = NULL;
			pr_debug("register:  mask[raw]: none\n");
		} else if (USE_DEBUG)
+1 −1
Original line number Diff line number Diff line
@@ -1485,7 +1485,7 @@ static void update_dev_time(char *path_name)
	struct file *filp;

	filp = filp_open(path_name, O_RDWR, 0);
	if (!filp)
	if (IS_ERR(filp))
		return;
	file_update_time(filp);
	filp_close(filp, NULL);
Loading