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

Commit 5b664cb2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  [PATCH] ocfs2: fix oops in mmap_truncate testing
  configfs: call drop_link() to cleanup after create_link() failure
  configfs: Allow ->make_item() and ->make_group() to return detailed errors.
  configfs: Fix failing mkdir() making racing rmdir() fail
  configfs: Fix deadlock with racing rmdir() and rename()
  configfs: Make configfs_new_dirent() return error code instead of NULL
  configfs: Protect configfs_dirent s_links list mutations
  configfs: Introduce configfs_dirent_lock
  ocfs2: Don't snprintf() without a format.
  ocfs2: Fix CONFIG_OCFS2_DEBUG_FS #ifdefs
  ocfs2/net: Silence build warnings on sparc64
  ocfs2: Handle error during journal load
  ocfs2: Silence an error message in ocfs2_file_aio_read()
  ocfs2: use simple_read_from_buffer()
  ocfs2: fix printk format warnings with OCFS2_FS_STATS=n
  [PATCH 2/2] ocfs2: Instrument fs cluster locks
  [PATCH 1/2] ocfs2: Add CONFIG_OCFS2_FS_STATS config option
parents f39548a6 c0420ad2
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -233,10 +233,12 @@ accomplished via the group operations specified on the group's
config_item_type.

	struct configfs_group_operations {
		struct config_item *(*make_item)(struct config_group *group,
						 const char *name);
		struct config_group *(*make_group)(struct config_group *group,
						   const char *name);
		int (*make_item)(struct config_group *group,
				 const char *name,
				 struct config_item **new_item);
		int (*make_group)(struct config_group *group,
				  const char *name,
				  struct config_group **new_group);
		int (*commit_item)(struct config_item *item);
		void (*disconnect_notify)(struct config_group *group,
					  struct config_item *item);
+8 −6
Original line number Diff line number Diff line
@@ -273,13 +273,13 @@ static inline struct simple_children *to_simple_children(struct config_item *ite
	return item ? container_of(to_config_group(item), struct simple_children, group) : NULL;
}

static struct config_item *simple_children_make_item(struct config_group *group, const char *name)
static int simple_children_make_item(struct config_group *group, const char *name, struct config_item **new_item)
{
	struct simple_child *simple_child;

	simple_child = kzalloc(sizeof(struct simple_child), GFP_KERNEL);
	if (!simple_child)
		return NULL;
		return -ENOMEM;


	config_item_init_type_name(&simple_child->item, name,
@@ -287,7 +287,8 @@ static struct config_item *simple_children_make_item(struct config_group *group,

	simple_child->storeme = 0;

	return &simple_child->item;
	*new_item = &simple_child->item;
	return 0;
}

static struct configfs_attribute simple_children_attr_description = {
@@ -359,20 +360,21 @@ static struct configfs_subsystem simple_children_subsys = {
 * children of its own.
 */

static struct config_group *group_children_make_group(struct config_group *group, const char *name)
static int group_children_make_group(struct config_group *group, const char *name, struct config_group **new_group)
{
	struct simple_children *simple_children;

	simple_children = kzalloc(sizeof(struct simple_children),
				  GFP_KERNEL);
	if (!simple_children)
		return NULL;
		return -ENOMEM;


	config_group_init_type_name(&simple_children->group, name,
				    &simple_children_type);

	return &simple_children->group;
	*new_group = &simple_children->group;
	return 0;
}

static struct configfs_attribute group_children_attr_description = {
+6 −4
Original line number Diff line number Diff line
@@ -585,8 +585,9 @@ static struct config_item_type netconsole_target_type = {
 * Group operations and type for netconsole_subsys.
 */

static struct config_item *make_netconsole_target(struct config_group *group,
						  const char *name)
static int make_netconsole_target(struct config_group *group,
				  const char *name,
				  struct config_item **new_item)
{
	unsigned long flags;
	struct netconsole_target *nt;
@@ -598,7 +599,7 @@ static struct config_item *make_netconsole_target(struct config_group *group,
	nt = kzalloc(sizeof(*nt), GFP_KERNEL);
	if (!nt) {
		printk(KERN_ERR "netconsole: failed to allocate memory\n");
		return NULL;
		return -ENOMEM;
	}

	nt->np.name = "netconsole";
@@ -615,7 +616,8 @@ static struct config_item *make_netconsole_target(struct config_group *group,
	list_add(&nt->list, &target_list);
	spin_unlock_irqrestore(&target_list_lock, flags);

	return &nt->item;
	*new_item = &nt->item;
	return 0;
}

static void drop_netconsole_target(struct config_group *group,
+8 −0
Original line number Diff line number Diff line
@@ -470,6 +470,14 @@ config OCFS2_FS_USERSPACE_CLUSTER
	  It is safe to say Y, as the clustering method is run-time
	  selectable.

config OCFS2_FS_STATS
	bool "OCFS2 statistics"
	depends on OCFS2_FS
	default y
	help
	  This option allows some fs statistics to be captured. Enabling
	  this option may increase the memory consumption.

config OCFS2_DEBUG_MASKLOG
	bool "OCFS2 logging support"
	depends on OCFS2_FS
+4 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@

#include <linux/slab.h>
#include <linux/list.h>
#include <linux/spinlock.h>

struct configfs_dirent {
	atomic_t		s_count;
@@ -47,8 +48,11 @@ struct configfs_dirent {
#define CONFIGFS_USET_DIR	0x0040
#define CONFIGFS_USET_DEFAULT	0x0080
#define CONFIGFS_USET_DROPPING	0x0100
#define CONFIGFS_USET_IN_MKDIR	0x0200
#define CONFIGFS_NOT_PINNED	(CONFIGFS_ITEM_ATTR)

extern spinlock_t configfs_dirent_lock;

extern struct vfsmount * configfs_mount;
extern struct kmem_cache *configfs_dir_cachep;

Loading