summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJan Harkes <jaharkes@cs.cmu.edu>2002-05-19 19:25:02 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-05-19 19:25:02 -0700
commit85b640c51ed9e8ba0ab15151d89a98e1a670d347 (patch)
treed66bffa1862249fa14a1c9d36fbd667236f4eb06 /include/linux
parent7a24f1a6d522cce1e319f434a202f7d6944924bc (diff)
[PATCH] iget_locked [2/6]
Now we introduce iget_locked and iget5_locked. These are similar to iget, but return a locked inode and read_inode has not been called. So the FS has to call read_inode to initialize the inode and then unlock it with unlock_new_inode(). This patch is based on the icreate patch from the XFS group, i.e. it is pretty much identical except for function naming.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4b551cb0326a..50138553bb15 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -799,6 +799,7 @@ struct super_operations {
#define I_LOCK 8
#define I_FREEING 16
#define I_CLEAR 32
+#define I_NEW 64
#define I_DIRTY (I_DIRTY_SYNC | I_DIRTY_DATASYNC | I_DIRTY_PAGES)
@@ -1207,6 +1208,10 @@ extern void force_delete(struct inode *);
extern struct inode * igrab(struct inode *);
extern ino_t iunique(struct super_block *, ino_t);
+extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
+extern struct inode * iget_locked(struct super_block *, unsigned long);
+extern void unlock_new_inode(struct inode *);
+
extern struct inode * iget4(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
static inline struct inode *iget(struct super_block *sb, unsigned long ino)
{