Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 309983
b: refs/heads/master
c: 77ba787
h: refs/heads/master
i:
  309981: 153146a
  309979: e6346f3
  309975: f435809
  309967: f12b29a
  309951: 57ddf73
v: v3
  • Loading branch information
Al Viro committed May 30, 2012
1 parent 7332a93 commit 8ec673a
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c217a2a004d98d09dfceec3a023c563ed800e833
refs/heads/master: 77ba78776e90e8de541f13b326e284c74286252f
10 changes: 5 additions & 5 deletions trunk/fs/xfs/kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ kmem_zalloc_greedy(size_t *size, size_t minsize, size_t maxsize)
}

void *
kmem_alloc(size_t size, unsigned int __nocast flags)
kmem_alloc(size_t size, xfs_km_flags_t flags)
{
int retries = 0;
gfp_t lflags = kmem_flags_convert(flags);
Expand All @@ -65,7 +65,7 @@ kmem_alloc(size_t size, unsigned int __nocast flags)
}

void *
kmem_zalloc(size_t size, unsigned int __nocast flags)
kmem_zalloc(size_t size, xfs_km_flags_t flags)
{
void *ptr;

Expand All @@ -87,7 +87,7 @@ kmem_free(const void *ptr)

void *
kmem_realloc(const void *ptr, size_t newsize, size_t oldsize,
unsigned int __nocast flags)
xfs_km_flags_t flags)
{
void *new;

Expand All @@ -102,7 +102,7 @@ kmem_realloc(const void *ptr, size_t newsize, size_t oldsize,
}

void *
kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags)
kmem_zone_alloc(kmem_zone_t *zone, xfs_km_flags_t flags)
{
int retries = 0;
gfp_t lflags = kmem_flags_convert(flags);
Expand All @@ -121,7 +121,7 @@ kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags)
}

void *
kmem_zone_zalloc(kmem_zone_t *zone, unsigned int __nocast flags)
kmem_zone_zalloc(kmem_zone_t *zone, xfs_km_flags_t flags)
{
void *ptr;

Expand Down
21 changes: 11 additions & 10 deletions trunk/fs/xfs/kmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,18 +27,19 @@
* General memory allocation interfaces
*/

#define KM_SLEEP 0x0001u
#define KM_NOSLEEP 0x0002u
#define KM_NOFS 0x0004u
#define KM_MAYFAIL 0x0008u
typedef unsigned __bitwise xfs_km_flags_t;
#define KM_SLEEP ((__force xfs_km_flags_t)0x0001u)
#define KM_NOSLEEP ((__force xfs_km_flags_t)0x0002u)
#define KM_NOFS ((__force xfs_km_flags_t)0x0004u)
#define KM_MAYFAIL ((__force xfs_km_flags_t)0x0008u)

/*
* We use a special process flag to avoid recursive callbacks into
* the filesystem during transactions. We will also issue our own
* warnings, so we explicitly skip any generic ones (silly of us).
*/
static inline gfp_t
kmem_flags_convert(unsigned int __nocast flags)
kmem_flags_convert(xfs_km_flags_t flags)
{
gfp_t lflags;

Expand All @@ -54,9 +55,9 @@ kmem_flags_convert(unsigned int __nocast flags)
return lflags;
}

extern void *kmem_alloc(size_t, unsigned int __nocast);
extern void *kmem_zalloc(size_t, unsigned int __nocast);
extern void *kmem_realloc(const void *, size_t, size_t, unsigned int __nocast);
extern void *kmem_alloc(size_t, xfs_km_flags_t);
extern void *kmem_zalloc(size_t, xfs_km_flags_t);
extern void *kmem_realloc(const void *, size_t, size_t, xfs_km_flags_t);
extern void kmem_free(const void *);

static inline void *kmem_zalloc_large(size_t size)
Expand Down Expand Up @@ -107,7 +108,7 @@ kmem_zone_destroy(kmem_zone_t *zone)
kmem_cache_destroy(zone);
}

extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast);
extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast);
extern void *kmem_zone_alloc(kmem_zone_t *, xfs_km_flags_t);
extern void *kmem_zone_zalloc(kmem_zone_t *, xfs_km_flags_t);

#endif /* __XFS_SUPPORT_KMEM_H__ */
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -3152,7 +3152,7 @@ xlog_ticket_alloc(
int cnt,
char client,
bool permanent,
int alloc_flags)
xfs_km_flags_t alloc_flags)
{
struct xlog_ticket *tic;
uint num_headers;
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_log_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,7 @@ extern void xlog_pack_data(xlog_t *log, xlog_in_core_t *iclog, int);
extern kmem_zone_t *xfs_log_ticket_zone;
struct xlog_ticket *xlog_ticket_alloc(struct log *log, int unit_bytes,
int count, char client, bool permanent,
int alloc_flags);
xfs_km_flags_t alloc_flags);


static inline void
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ xfs_trans_t *
_xfs_trans_alloc(
xfs_mount_t *mp,
uint type,
uint memflags)
xfs_km_flags_t memflags)
{
xfs_trans_t *tp;

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_trans.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ typedef struct xfs_trans {
* XFS transaction mechanism exported interfaces.
*/
xfs_trans_t *xfs_trans_alloc(struct xfs_mount *, uint);
xfs_trans_t *_xfs_trans_alloc(struct xfs_mount *, uint, uint);
xfs_trans_t *_xfs_trans_alloc(struct xfs_mount *, uint, xfs_km_flags_t);
xfs_trans_t *xfs_trans_dup(xfs_trans_t *);
int xfs_trans_reserve(xfs_trans_t *, uint, uint, uint,
uint, uint);
Expand Down

0 comments on commit 8ec673a

Please sign in to comment.