summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-11-13 08:15:30 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-11-13 08:15:30 -0800
commiteea2078eaf2bcd4e5e8b2e08798071efedac5e17 (patch)
treee8b9f7ea55f098c6c73d4bdca2794f40ce619476 /fs/xfs/xfs_inode.h
parentea991f06d851d58268eac6ce5c2152397757c958 (diff)
parent050e714eb2bc662e9df6bf048ce86b4fbdd9bcd3 (diff)
downloadop-kernel-dev-eea2078eaf2bcd4e5e8b2e08798071efedac5e17.zip
op-kernel-dev-eea2078eaf2bcd4e5e8b2e08798071efedac5e17.tar.gz
Merge git://oss.sgi.com:8090/xfs/xfs-2.6
* git://oss.sgi.com:8090/xfs/xfs-2.6: [XFS] Remove KERNEL_VERSION macros from xfs_dmapi.h [XFS] Prevent a deadlock when xfslogd unpins inodes. [XFS] Clean up i_flags and i_flags_lock handling. [XFS] 956664: dm_read_invis() changes i_atime [XFS] rename uio_read() to xfs_uio_read() [XFS] Keep lockdep happy. [XFS] 956618: Linux crashes on boot with XFS-DMAPI filesystem when
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r--fs/xfs/xfs_inode.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index e96eb08..bc82372 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -305,6 +305,47 @@ typedef struct xfs_inode {
#endif
} xfs_inode_t;
+
+/*
+ * i_flags helper functions
+ */
+static inline void
+__xfs_iflags_set(xfs_inode_t *ip, unsigned short flags)
+{
+ ip->i_flags |= flags;
+}
+
+static inline void
+xfs_iflags_set(xfs_inode_t *ip, unsigned short flags)
+{
+ spin_lock(&ip->i_flags_lock);
+ __xfs_iflags_set(ip, flags);
+ spin_unlock(&ip->i_flags_lock);
+}
+
+static inline void
+xfs_iflags_clear(xfs_inode_t *ip, unsigned short flags)
+{
+ spin_lock(&ip->i_flags_lock);
+ ip->i_flags &= ~flags;
+ spin_unlock(&ip->i_flags_lock);
+}
+
+static inline int
+__xfs_iflags_test(xfs_inode_t *ip, unsigned short flags)
+{
+ return (ip->i_flags & flags);
+}
+
+static inline int
+xfs_iflags_test(xfs_inode_t *ip, unsigned short flags)
+{
+ int ret;
+ spin_lock(&ip->i_flags_lock);
+ ret = __xfs_iflags_test(ip, flags);
+ spin_unlock(&ip->i_flags_lock);
+ return ret;
+}
#endif /* __KERNEL__ */
OpenPOWER on IntegriCloud