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

Commit 1b6150fe authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull GFS2 fixes from Steven Whitehouse

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-fixes:
  GFS2: Allow caching of rindex glock
  GFS2: Make sure rindex is uptodate before starting transactions
  GFS2: use depends instead of select in kconfig
  GFS2: put glock reference in error patch of read_rindex_entry
parents 92ae03f2 ca9248d8
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
config GFS2_FS
	tristate "GFS2 file system support"
	depends on (64BIT || LBDAF)
	select DLM if GFS2_FS_LOCKING_DLM
	select CONFIGFS_FS if GFS2_FS_LOCKING_DLM
	select SYSFS if GFS2_FS_LOCKING_DLM
	select IP_SCTP if DLM_SCTP
	select FS_POSIX_ACL
	select CRC32
	select QUOTACTL
@@ -29,7 +25,8 @@ config GFS2_FS

config GFS2_FS_LOCKING_DLM
	bool "GFS2 DLM locking"
	depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && HOTPLUG
	depends on (GFS2_FS!=n) && NET && INET && (IPV6 || IPV6=n) && \
		HOTPLUG && DLM && CONFIGFS_FS && SYSFS
	help
	  Multiple node locking module for GFS2

+2 −2
Original line number Diff line number Diff line
@@ -807,7 +807,7 @@ static int gfs2_stuffed_write_end(struct inode *inode, struct buffer_head *dibh,

	if (inode == sdp->sd_rindex) {
		adjust_fs_space(inode);
		ip->i_gh.gh_flags |= GL_NOCACHE;
		sdp->sd_rindex_uptodate = 0;
	}

	brelse(dibh);
@@ -873,7 +873,7 @@ static int gfs2_write_end(struct file *file, struct address_space *mapping,

	if (inode == sdp->sd_rindex) {
		adjust_fs_space(inode);
		ip->i_gh.gh_flags |= GL_NOCACHE;
		sdp->sd_rindex_uptodate = 0;
	}

	brelse(dibh);
+5 −1
Original line number Diff line number Diff line
@@ -724,7 +724,11 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh,
	int metadata;
	unsigned int revokes = 0;
	int x;
	int error = 0;
	int error;

	error = gfs2_rindex_update(sdp);
	if (error)
		return error;

	if (!*top)
		sm->sm_first = 0;
+4 −0
Original line number Diff line number Diff line
@@ -1844,6 +1844,10 @@ static int leaf_dealloc(struct gfs2_inode *dip, u32 index, u32 len,
	unsigned int x, size = len * sizeof(u64);
	int error;

	error = gfs2_rindex_update(sdp);
	if (error)
		return error;

	memset(&rlist, 0, sizeof(struct gfs2_rgrp_list));

	ht = kzalloc(size, GFP_NOFS);
+11 −2
Original line number Diff line number Diff line
@@ -1031,7 +1031,13 @@ static int gfs2_unlink(struct inode *dir, struct dentry *dentry)
	struct buffer_head *bh;
	struct gfs2_holder ghs[3];
	struct gfs2_rgrpd *rgd;
	int error = -EROFS;
	int error;

	error = gfs2_rindex_update(sdp);
	if (error)
		return error;

	error = -EROFS;

	gfs2_holder_init(dip->i_gl, LM_ST_EXCLUSIVE, 0, ghs);
	gfs2_holder_init(ip->i_gl,  LM_ST_EXCLUSIVE, 0, ghs + 1);
@@ -1224,6 +1230,10 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
			return 0;
	}

	error = gfs2_rindex_update(sdp);
	if (error)
		return error;

	if (odip != ndip) {
		error = gfs2_glock_nq_init(sdp->sd_rename_gl, LM_ST_EXCLUSIVE,
					   0, &r_gh);
@@ -1345,7 +1355,6 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
	error = alloc_required;
	if (error < 0)
		goto out_gunlock;
	error = 0;

	if (alloc_required) {
		struct gfs2_qadata *qa = gfs2_qadata_get(ndip);
Loading