]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
xfs: remove xfs_buf_target_name
authorChristoph Hellwig <hch@infradead.org>
Mon, 10 Oct 2011 16:52:51 +0000 (16:52 +0000)
committerAlex Elder <aelder@sgi.com>
Tue, 11 Oct 2011 16:38:56 +0000 (11:38 -0500)
The calling convention that returns a pointer to a static buffer is
fairly nasty, so just opencode it in the only caller that is left.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.h

index 0a767fca0305082ebf7be7fa54bed75a28b98635..6f615c259411e955317ddd21ab93b4bced56f5fa 100644 (file)
@@ -1457,9 +1457,13 @@ xfs_setsize_buftarg_flags(
        btp->bt_smask = sectorsize - 1;
 
        if (set_blocksize(btp->bt_bdev, sectorsize)) {
+               char name[BDEVNAME_SIZE];
+
+               bdevname(btp->bt_bdev, name);
+
                xfs_warn(btp->bt_mount,
                        "Cannot set_blocksize to %u on device %s\n",
-                       sectorsize, xfs_buf_target_name(btp));
+                       sectorsize, name);
                return EINVAL;
        }
 
index 357a3371cae7b0675aa3a3acd4b4cc49145f2433..be19dd2b0212b3a579414af1adcafdabf1922007 100644 (file)
@@ -230,15 +230,6 @@ extern void xfs_buf_delwri_promote(struct xfs_buf *);
 extern int xfs_buf_init(void);
 extern void xfs_buf_terminate(void);
 
-static inline const char *
-xfs_buf_target_name(struct xfs_buftarg *target)
-{
-       static char __b[BDEVNAME_SIZE];
-
-       return bdevname(target->bt_bdev, __b);
-}
-
-
 #define XFS_BUF_ZEROFLAGS(bp) \
        ((bp)->b_flags &= ~(XBF_READ|XBF_WRITE|XBF_ASYNC|XBF_DELWRI| \
                            XBF_SYNCIO|XBF_FUA|XBF_FLUSH))