aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_buf.c6
-rw-r--r--fs/xfs/xfs_buf.h9
2 files changed, 5 insertions, 10 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index 0a767fca0305..6f615c259411 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1457,9 +1457,13 @@ xfs_setsize_buftarg_flags(
1457 btp->bt_smask = sectorsize - 1; 1457 btp->bt_smask = sectorsize - 1;
1458 1458
1459 if (set_blocksize(btp->bt_bdev, sectorsize)) { 1459 if (set_blocksize(btp->bt_bdev, sectorsize)) {
1460 char name[BDEVNAME_SIZE];
1461
1462 bdevname(btp->bt_bdev, name);
1463
1460 xfs_warn(btp->bt_mount, 1464 xfs_warn(btp->bt_mount,
1461 "Cannot set_blocksize to %u on device %s\n", 1465 "Cannot set_blocksize to %u on device %s\n",
1462 sectorsize, xfs_buf_target_name(btp)); 1466 sectorsize, name);
1463 return EINVAL; 1467 return EINVAL;
1464 } 1468 }
1465 1469
diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
index 357a3371cae7..be19dd2b0212 100644
--- a/fs/xfs/xfs_buf.h
+++ b/fs/xfs/xfs_buf.h
@@ -230,15 +230,6 @@ extern void xfs_buf_delwri_promote(struct xfs_buf *);
230extern int xfs_buf_init(void); 230extern int xfs_buf_init(void);
231extern void xfs_buf_terminate(void); 231extern void xfs_buf_terminate(void);
232 232
233static inline const char *
234xfs_buf_target_name(struct xfs_buftarg *target)
235{
236 static char __b[BDEVNAME_SIZE];
237
238 return bdevname(target->bt_bdev, __b);
239}
240
241
242#define XFS_BUF_ZEROFLAGS(bp) \ 233#define XFS_BUF_ZEROFLAGS(bp) \
243 ((bp)->b_flags &= ~(XBF_READ|XBF_WRITE|XBF_ASYNC|XBF_DELWRI| \ 234 ((bp)->b_flags &= ~(XBF_READ|XBF_WRITE|XBF_ASYNC|XBF_DELWRI| \
244 XBF_SYNCIO|XBF_FUA|XBF_FLUSH)) 235 XBF_SYNCIO|XBF_FUA|XBF_FLUSH))