diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-12-01 04:56:43 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-12-01 04:56:43 -0500 |
commit | bd3c97a7c718bfb9f1e4f31c16c383a5c6f815eb (patch) | |
tree | 3f56594e813c6f35cbacbdb3e137ba5bfd0b3069 /fs/xfs/xfs_inode.h | |
parent | 6c33cafc794d07c9254c160789120a0e98c088c9 (diff) | |
parent | 0215ffb08ce99e2bb59eca114a99499a4d06e704 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r-- | fs/xfs/xfs_inode.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h index e96eb0835fe6..bc823720d88f 100644 --- a/fs/xfs/xfs_inode.h +++ b/fs/xfs/xfs_inode.h | |||
@@ -305,6 +305,47 @@ typedef struct xfs_inode { | |||
305 | #endif | 305 | #endif |
306 | } xfs_inode_t; | 306 | } xfs_inode_t; |
307 | 307 | ||
308 | |||
309 | /* | ||
310 | * i_flags helper functions | ||
311 | */ | ||
312 | static inline void | ||
313 | __xfs_iflags_set(xfs_inode_t *ip, unsigned short flags) | ||
314 | { | ||
315 | ip->i_flags |= flags; | ||
316 | } | ||
317 | |||
318 | static inline void | ||
319 | xfs_iflags_set(xfs_inode_t *ip, unsigned short flags) | ||
320 | { | ||
321 | spin_lock(&ip->i_flags_lock); | ||
322 | __xfs_iflags_set(ip, flags); | ||
323 | spin_unlock(&ip->i_flags_lock); | ||
324 | } | ||
325 | |||
326 | static inline void | ||
327 | xfs_iflags_clear(xfs_inode_t *ip, unsigned short flags) | ||
328 | { | ||
329 | spin_lock(&ip->i_flags_lock); | ||
330 | ip->i_flags &= ~flags; | ||
331 | spin_unlock(&ip->i_flags_lock); | ||
332 | } | ||
333 | |||
334 | static inline int | ||
335 | __xfs_iflags_test(xfs_inode_t *ip, unsigned short flags) | ||
336 | { | ||
337 | return (ip->i_flags & flags); | ||
338 | } | ||
339 | |||
340 | static inline int | ||
341 | xfs_iflags_test(xfs_inode_t *ip, unsigned short flags) | ||
342 | { | ||
343 | int ret; | ||
344 | spin_lock(&ip->i_flags_lock); | ||
345 | ret = __xfs_iflags_test(ip, flags); | ||
346 | spin_unlock(&ip->i_flags_lock); | ||
347 | return ret; | ||
348 | } | ||
308 | #endif /* __KERNEL__ */ | 349 | #endif /* __KERNEL__ */ |
309 | 350 | ||
310 | 351 | ||