OSDN Git Service

xfs: remove the unused XFS_ALLOC_USERDATA flag
authorChristoph Hellwig <hch@lst.de>
Fri, 30 Aug 2019 15:56:56 +0000 (08:56 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sat, 31 Aug 2019 05:43:58 +0000 (22:43 -0700)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_alloc.h
fs/xfs/libxfs/xfs_bmap.c

index d6ed5d2..58fa85c 100644 (file)
@@ -81,10 +81,9 @@ typedef struct xfs_alloc_arg {
 /*
  * Defines for datatype
  */
-#define XFS_ALLOC_USERDATA             (1 << 0)/* allocation is for user data*/
-#define XFS_ALLOC_INITIAL_USER_DATA    (1 << 1)/* special case start of file */
-#define XFS_ALLOC_USERDATA_ZERO                (1 << 2)/* zero extent on allocation */
-#define XFS_ALLOC_NOBUSY               (1 << 3)/* Busy extents not allowed */
+#define XFS_ALLOC_INITIAL_USER_DATA    (1 << 0)/* special case start of file */
+#define XFS_ALLOC_USERDATA_ZERO                (1 << 1)/* zero extent on allocation */
+#define XFS_ALLOC_NOBUSY               (1 << 2)/* Busy extents not allowed */
 
 static inline bool
 xfs_alloc_is_userdata(int datatype)
index 05aedf4..6d97794 100644 (file)
@@ -4042,12 +4042,8 @@ xfs_bmapi_allocate(
         */
        if (!(bma->flags & XFS_BMAPI_METADATA)) {
                bma->datatype = XFS_ALLOC_NOBUSY;
-               if (whichfork == XFS_DATA_FORK) {
-                       if (bma->offset == 0)
-                               bma->datatype |= XFS_ALLOC_INITIAL_USER_DATA;
-                       else
-                               bma->datatype |= XFS_ALLOC_USERDATA;
-               }
+               if (whichfork == XFS_DATA_FORK && bma->offset == 0)
+                       bma->datatype |= XFS_ALLOC_INITIAL_USER_DATA;
                if (bma->flags & XFS_BMAPI_ZERO)
                        bma->datatype |= XFS_ALLOC_USERDATA_ZERO;
        }