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

Commit de50e16f authored by Dave Chinner's avatar Dave Chinner
Browse files

Merge branch 'xfs-misc-fixes-for-4.2-3' into for-next

parents 3d238b7e f66bf042
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -51,8 +51,7 @@ xfs_icluster_size_fsb(
static inline struct xfs_dinode *
xfs_make_iptr(struct xfs_mount *mp, struct xfs_buf *b, int o)
{
	return (struct xfs_dinode *)
		(xfs_buf_offset(b, o << (mp)->m_sb.sb_inodelog));
	return xfs_buf_offset(b, o << (mp)->m_sb.sb_inodelog);
}

/*
+3 −5
Original line number Diff line number Diff line
@@ -46,8 +46,7 @@ xfs_inobp_check(
	j = mp->m_inode_cluster_size >> mp->m_sb.sb_inodelog;

	for (i = 0; i < j; i++) {
		dip = (xfs_dinode_t *)xfs_buf_offset(bp,
					i * mp->m_sb.sb_inodesize);
		dip = xfs_buf_offset(bp, i * mp->m_sb.sb_inodesize);
		if (!dip->di_next_unlinked)  {
			xfs_alert(mp,
	"Detected bogus zero next_unlinked field in inode %d buffer 0x%llx.",
@@ -86,8 +85,7 @@ xfs_inode_buf_verify(
		int		di_ok;
		xfs_dinode_t	*dip;

		dip = (struct xfs_dinode *)xfs_buf_offset(bp,
					(i << mp->m_sb.sb_inodelog));
		dip = xfs_buf_offset(bp, (i << mp->m_sb.sb_inodelog));
		di_ok = dip->di_magic == cpu_to_be16(XFS_DINODE_MAGIC) &&
			    XFS_DINODE_GOOD_VERSION(dip->di_version);
		if (unlikely(XFS_TEST_ERROR(!di_ok, mp,
@@ -186,7 +184,7 @@ xfs_imap_to_bp(
	}

	*bpp = bp;
	*dipp = (struct xfs_dinode *)xfs_buf_offset(bp, imap->im_boffset);
	*dipp = xfs_buf_offset(bp, imap->im_boffset);
	return 0;
}

+8 −2
Original line number Diff line number Diff line
@@ -433,8 +433,14 @@ xfs_attr_inactive(
	 */
	xfs_trans_ijoin(trans, dp, 0);

	/* invalidate and truncate the attribute fork extents */
	if (dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) {
	/*
	 * Invalidate and truncate the attribute fork extents. Make sure the
	 * fork actually has attributes as otherwise the invalidation has no
	 * blocks to read and returns an error. In this case, just do the fork
	 * removal below.
	 */
	if (xfs_inode_hasattr(dp) &&
	    dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) {
		error = xfs_attr3_root_inactive(&trans, dp);
		if (error)
			goto out_cancel;
+3 −3
Original line number Diff line number Diff line
@@ -1419,9 +1419,9 @@ xfs_buf_submit_wait(
	return error;
}

xfs_caddr_t
void *
xfs_buf_offset(
	xfs_buf_t		*bp,
	struct xfs_buf		*bp,
	size_t			offset)
{
	struct page		*page;
@@ -1431,7 +1431,7 @@ xfs_buf_offset(

	offset += bp->b_offset;
	page = bp->b_pages[offset >> PAGE_SHIFT];
	return (xfs_caddr_t)page_address(page) + (offset & (PAGE_SIZE-1));
	return page_address(page) + (offset & (PAGE_SIZE-1));
}

/*
+1 −1
Original line number Diff line number Diff line
@@ -299,7 +299,7 @@ extern void xfs_buf_iomove(xfs_buf_t *, size_t, size_t, void *,
	    xfs_buf_iomove((bp), (off), (len), NULL, XBRW_ZERO)

/* Buffer Utility Routines */
extern xfs_caddr_t xfs_buf_offset(xfs_buf_t *, size_t);
extern void *xfs_buf_offset(struct xfs_buf *, size_t);

/* Delayed Write Buffer Routines */
extern bool xfs_buf_delwri_queue(struct xfs_buf *, struct list_head *);
Loading