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

Commit 41e46ac0 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull gfs2 updates from Steven Whitehouse:
 "This time we have a couple of bug fixes, one relating to bad i_goal
  values which are now ignored (i_goal is basically a hint so it is safe
  to so this) and another relating to the saving of the dirent location
  during rename.

  There is one performance improvement, which is an optimisation in
  rgblk_free so that multiple block deallocations will now be more
  efficient, and one clean up patch to use _RET_IP_ rather than writing
  it out longhand"

* tag 'gfs2-merge-window' of git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-3.0-nmw:
  GFS2: use _RET_IP_ instead of (unsigned long)__builtin_return_address(0)
  GFS2: Use gfs2_rbm_incr in rgblk_free
  GFS2: Make rename not save dirent location
  GFS2: fix bad inode i_goal values during block allocation
parents 27a9716b d29c0afe
Loading
Loading
Loading
Loading
+7 −2
Original line number Original line Diff line number Diff line
@@ -2100,8 +2100,13 @@ int gfs2_diradd_alloc_required(struct inode *inode, const struct qstr *name,
	}
	}
	if (IS_ERR(dent))
	if (IS_ERR(dent))
		return PTR_ERR(dent);
		return PTR_ERR(dent);

	if (da->save_loc) {
		da->bh = bh;
		da->bh = bh;
		da->dent = dent;
		da->dent = dent;
	} else {
		brelse(bh);
	}
	return 0;
	return 0;
}
}
+1 −0
Original line number Original line Diff line number Diff line
@@ -23,6 +23,7 @@ struct gfs2_diradd {
	unsigned nr_blocks;
	unsigned nr_blocks;
	struct gfs2_dirent *dent;
	struct gfs2_dirent *dent;
	struct buffer_head *bh;
	struct buffer_head *bh;
	int save_loc;
};
};


extern struct inode *gfs2_dir_search(struct inode *dir,
extern struct inode *gfs2_dir_search(struct inode *dir,
+2 −2
Original line number Original line Diff line number Diff line
@@ -811,7 +811,7 @@ void gfs2_holder_init(struct gfs2_glock *gl, unsigned int state, unsigned flags,
{
{
	INIT_LIST_HEAD(&gh->gh_list);
	INIT_LIST_HEAD(&gh->gh_list);
	gh->gh_gl = gl;
	gh->gh_gl = gl;
	gh->gh_ip = (unsigned long)__builtin_return_address(0);
	gh->gh_ip = _RET_IP_;
	gh->gh_owner_pid = get_pid(task_pid(current));
	gh->gh_owner_pid = get_pid(task_pid(current));
	gh->gh_state = state;
	gh->gh_state = state;
	gh->gh_flags = flags;
	gh->gh_flags = flags;
@@ -835,7 +835,7 @@ void gfs2_holder_reinit(unsigned int state, unsigned flags, struct gfs2_holder *
	gh->gh_state = state;
	gh->gh_state = state;
	gh->gh_flags = flags;
	gh->gh_flags = flags;
	gh->gh_iflags = 0;
	gh->gh_iflags = 0;
	gh->gh_ip = (unsigned long)__builtin_return_address(0);
	gh->gh_ip = _RET_IP_;
	if (gh->gh_owner_pid)
	if (gh->gh_owner_pid)
		put_pid(gh->gh_owner_pid);
		put_pid(gh->gh_owner_pid);
	gh->gh_owner_pid = get_pid(task_pid(current));
	gh->gh_owner_pid = get_pid(task_pid(current));
+1 −1
Original line number Original line Diff line number Diff line
@@ -93,7 +93,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl)
         * tr->alloced is not set since the transaction structure is
         * tr->alloced is not set since the transaction structure is
         * on the stack */
         * on the stack */
	tr.tr_reserved = 1 + gfs2_struct2blk(sdp, tr.tr_revokes, sizeof(u64));
	tr.tr_reserved = 1 + gfs2_struct2blk(sdp, tr.tr_revokes, sizeof(u64));
	tr.tr_ip = (unsigned long)__builtin_return_address(0);
	tr.tr_ip = _RET_IP_;
	sb_start_intwrite(sdp->sd_vfs);
	sb_start_intwrite(sdp->sd_vfs);
	if (gfs2_log_reserve(sdp, tr.tr_reserved) < 0) {
	if (gfs2_log_reserve(sdp, tr.tr_reserved) < 0) {
		sb_end_intwrite(sdp->sd_vfs);
		sb_end_intwrite(sdp->sd_vfs);
+4 −3
Original line number Original line Diff line number Diff line
@@ -600,7 +600,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
	int error, free_vfs_inode = 0;
	int error, free_vfs_inode = 0;
	u32 aflags = 0;
	u32 aflags = 0;
	unsigned blocks = 1;
	unsigned blocks = 1;
	struct gfs2_diradd da = { .bh = NULL, };
	struct gfs2_diradd da = { .bh = NULL, .save_loc = 1, };


	if (!name->len || name->len > GFS2_FNAMESIZE)
	if (!name->len || name->len > GFS2_FNAMESIZE)
		return -ENAMETOOLONG;
		return -ENAMETOOLONG;
@@ -672,6 +672,7 @@ static int gfs2_create_inode(struct inode *dir, struct dentry *dentry,
	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
	gfs2_set_inode_blocks(inode, 1);
	gfs2_set_inode_blocks(inode, 1);
	munge_mode_uid_gid(dip, inode);
	munge_mode_uid_gid(dip, inode);
	check_and_update_goal(dip);
	ip->i_goal = dip->i_goal;
	ip->i_goal = dip->i_goal;
	ip->i_diskflags = 0;
	ip->i_diskflags = 0;
	ip->i_eattr = 0;
	ip->i_eattr = 0;
@@ -899,7 +900,7 @@ static int gfs2_link(struct dentry *old_dentry, struct inode *dir,
	struct gfs2_inode *ip = GFS2_I(inode);
	struct gfs2_inode *ip = GFS2_I(inode);
	struct gfs2_holder ghs[2];
	struct gfs2_holder ghs[2];
	struct buffer_head *dibh;
	struct buffer_head *dibh;
	struct gfs2_diradd da = { .bh = NULL, };
	struct gfs2_diradd da = { .bh = NULL, .save_loc = 1, };
	int error;
	int error;


	if (S_ISDIR(inode->i_mode))
	if (S_ISDIR(inode->i_mode))
@@ -1337,7 +1338,7 @@ static int gfs2_rename(struct inode *odir, struct dentry *odentry,
	struct gfs2_rgrpd *nrgd;
	struct gfs2_rgrpd *nrgd;
	unsigned int num_gh;
	unsigned int num_gh;
	int dir_rename = 0;
	int dir_rename = 0;
	struct gfs2_diradd da = { .nr_blocks = 0, };
	struct gfs2_diradd da = { .nr_blocks = 0, .save_loc = 0, };
	unsigned int x;
	unsigned int x;
	int error;
	int error;


Loading