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

Commit a0f79386 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull orangefs updates from Mike Marshall:
 "Mostly cleanups, but three bug fixes:

   - don't pass garbage return codes back up the call chain (Mike
     Marshall)

   - fix stale inode test (Martin Brandenburg)

   - fix off-by-one errors (Xiongfeng Wang)

  Also add Martin as a reviewer in the Maintainers file"

* tag 'for-linus-4.16' of git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux:
  orangefs: reverse sense of is-inode-stale test in d_revalidate
  orangefs: simplify orangefs_inode_is_stale
  Orangefs: don't propogate whacky error codes
  orangefs: use correct string length
  orangefs: make orangefs_make_bad_inode static
  orangefs: remove ORANGEFS_KERNEL_DEBUG
  orangefs: remove gossip_ldebug and gossip_lerr
  orangefs: make orangefs_client_debug_init static
  MAINTAINERS: update orangefs list and add myself as reviewer
parents 81153336 74e938c2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -10331,7 +10331,8 @@ F: fs/ocfs2/

ORANGEFS FILESYSTEM
M:	Mike Marshall <hubcap@omnibond.com>
L:	pvfs2-developers@beowulf-underground.org (subscribers-only)
R:	Martin Brandenburg <martin@omnibond.com>
L:	devel@lists.orangefs.org
T:	git git://git.kernel.org/pub/scm/linux/kernel/git/hubcap/linux.git
S:	Supported
F:	fs/orangefs/
+8 −11
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ static int orangefs_revalidate_lookup(struct dentry *dentry)
	new_op->upcall.req.lookup.parent_refn = parent->refn;
	strncpy(new_op->upcall.req.lookup.d_name,
		dentry->d_name.name,
		ORANGEFS_NAME_MAX);
		ORANGEFS_NAME_MAX - 1);

	gossip_debug(GOSSIP_DCACHE_DEBUG,
		     "%s:%s:%d interrupt flag [%d]\n",
@@ -118,8 +118,12 @@ static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags)
		return 0;

	/* We do not need to continue with negative dentries. */
	if (!dentry->d_inode)
		goto out;
	if (!dentry->d_inode) {
		gossip_debug(GOSSIP_DCACHE_DEBUG,
		    "%s: negative dentry or positive dentry and inode valid.\n",
		    __func__);
		return 1;
	}

	/* Now we must perform a getattr to validate the inode contents. */

@@ -129,14 +133,7 @@ static int orangefs_d_revalidate(struct dentry *dentry, unsigned int flags)
		    __FILE__, __func__, __LINE__);
		return 0;
	}
	if (ret == 0)
		return 0;

out:
	gossip_debug(GOSSIP_DCACHE_DEBUG,
	    "%s: negative dentry or positive dentry and inode valid.\n",
	    __func__);
	return 1;
	return !ret;
}

const struct dentry_operations orangefs_dentry_operations = {
+8 −8
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ static int orangefs_create(struct inode *dir,
			       ORANGEFS_TYPE_METAFILE, mode);

	strncpy(new_op->upcall.req.create.d_name,
		dentry->d_name.name, ORANGEFS_NAME_MAX);
		dentry->d_name.name, ORANGEFS_NAME_MAX - 1);

	ret = service_operation(new_op, __func__, get_interruptible_flag(dir));

@@ -142,7 +142,7 @@ static struct dentry *orangefs_lookup(struct inode *dir, struct dentry *dentry,
	new_op->upcall.req.lookup.parent_refn = parent->refn;

	strncpy(new_op->upcall.req.lookup.d_name, dentry->d_name.name,
		ORANGEFS_NAME_MAX);
		ORANGEFS_NAME_MAX - 1);

	gossip_debug(GOSSIP_NAME_DEBUG,
		     "%s: doing lookup on %s under %pU,%d\n",
@@ -244,7 +244,7 @@ static int orangefs_unlink(struct inode *dir, struct dentry *dentry)

	new_op->upcall.req.remove.parent_refn = parent->refn;
	strncpy(new_op->upcall.req.remove.d_name, dentry->d_name.name,
		ORANGEFS_NAME_MAX);
		ORANGEFS_NAME_MAX - 1);

	ret = service_operation(new_op, "orangefs_unlink",
				get_interruptible_flag(inode));
@@ -300,8 +300,8 @@ static int orangefs_symlink(struct inode *dir,

	strncpy(new_op->upcall.req.sym.entry_name,
		dentry->d_name.name,
		ORANGEFS_NAME_MAX);
	strncpy(new_op->upcall.req.sym.target, symname, ORANGEFS_NAME_MAX);
		ORANGEFS_NAME_MAX - 1);
	strncpy(new_op->upcall.req.sym.target, symname, ORANGEFS_NAME_MAX - 1);

	ret = service_operation(new_op, __func__, get_interruptible_flag(dir));

@@ -372,7 +372,7 @@ static int orangefs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
			      ORANGEFS_TYPE_DIRECTORY, mode);

	strncpy(new_op->upcall.req.mkdir.d_name,
		dentry->d_name.name, ORANGEFS_NAME_MAX);
		dentry->d_name.name, ORANGEFS_NAME_MAX - 1);

	ret = service_operation(new_op, __func__, get_interruptible_flag(dir));

@@ -453,10 +453,10 @@ static int orangefs_rename(struct inode *old_dir,

	strncpy(new_op->upcall.req.rename.d_old_name,
		old_dentry->d_name.name,
		ORANGEFS_NAME_MAX);
		ORANGEFS_NAME_MAX - 1);
	strncpy(new_op->upcall.req.rename.d_new_name,
		new_dentry->d_name.name,
		ORANGEFS_NAME_MAX);
		ORANGEFS_NAME_MAX - 1);

	ret = service_operation(new_op,
				"orangefs_rename",
+2 −2
Original line number Diff line number Diff line
@@ -328,7 +328,7 @@ static int help_show(struct seq_file *m, void *v)
/*
 * initialize the client-debug file.
 */
int orangefs_client_debug_init(void)
static int orangefs_client_debug_init(void)
{

	int rc = -ENOMEM;
@@ -1056,7 +1056,7 @@ int orangefs_debugfs_new_debug(void __user *arg)
			client_debug_string,
			llu(mask_info.mask_value));
	} else {
		gossip_lerr("Invalid mask type....\n");
		gossip_err("Invalid mask type....\n");
		return -EINVAL;
	}

+0 −1
Original line number Diff line number Diff line
/* SPDX-License-Identifier: GPL-2.0 */
int orangefs_debugfs_init(int);
void orangefs_debugfs_cleanup(void);
int orangefs_client_debug_init(void);
int orangefs_prepare_debugfs_help_string(int);
int orangefs_debugfs_new_client_mask(void __user *);
int orangefs_debugfs_new_client_string(void __user *);
Loading