patch-2.4.0-test2 linux/include/linux/fs.h
Next file: linux/include/linux/gameport.h
Previous file: linux/include/linux/file.h
Back to the patch index
Back to the overall index
- Lines: 89
- Date:
Fri Jun 23 21:30:24 2000
- Orig file:
v2.4.0-test1/linux/include/linux/fs.h
- Orig date:
Mon Jun 19 16:32:02 2000
diff -u --recursive --new-file v2.4.0-test1/linux/include/linux/fs.h linux/include/linux/fs.h
@@ -376,7 +376,7 @@
struct list_head i_dentry;
unsigned long i_ino;
- unsigned int i_count;
+ atomic_t i_count;
kdev_t i_dev;
umode_t i_mode;
nlink_t i_nlink;
@@ -554,6 +554,15 @@
struct file *fa_file;
};
+#define FASYNC_MAGIC 0x4601
+
+/* SMP safe fasync helpers: */
+extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
+/* can be called from interrupts */
+extern void kill_fasync(struct fasync_struct **, int, int);
+/* only for net: no internal synchronization */
+extern void __kill_fasync(struct fasync_struct *, int, int);
+
struct nameidata {
struct dentry *dentry;
struct vfsmount *mnt;
@@ -562,10 +571,6 @@
int last_type;
};
-#define FASYNC_MAGIC 0x4601
-
-extern int fasync_helper(int, struct file *, int, struct fasync_struct **);
-
#define DQUOT_USR_ENABLED 0x01 /* User diskquotas enabled */
#define DQUOT_GRP_ENABLED 0x02 /* Group diskquotas enabled */
@@ -705,6 +710,7 @@
* without the big kernel lock held in all filesystems.
*/
struct file_operations {
+ struct module *owner;
loff_t (*llseek) (struct file *, loff_t, int);
ssize_t (*read) (struct file *, char *, size_t, loff_t *);
ssize_t (*write) (struct file *, const char *, size_t, loff_t *);
@@ -789,6 +795,18 @@
#define DECLARE_FSTYPE_DEV(var,type,read) \
DECLARE_FSTYPE(var,type,read,FS_REQUIRES_DEV)
+/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
+#define fops_get(fops) \
+ (((fops) && (fops)->owner) \
+ ? __MOD_INC_USE_COUNT((fops)->owner), (fops) \
+ : (fops))
+
+#define fops_put(fops) \
+do { \
+ if ((fops) && (fops)->owner) \
+ __MOD_DEC_USE_COUNT((fops)->owner); \
+} while(0)
+
extern int register_filesystem(struct file_system_type *);
extern int unregister_filesystem(struct file_system_type *);
extern struct vfsmount *kern_mount(struct file_system_type *);
@@ -853,9 +871,6 @@
asmlinkage long sys_close(unsigned int); /* yes, it's really unsigned */
extern int do_close(unsigned int, int); /* yes, it's really unsigned */
extern int do_truncate(struct dentry *, loff_t start);
-extern int get_unused_fd(void);
-extern void __put_unused_fd(struct files_struct *, unsigned int); /* locked outside */
-extern void put_unused_fd(unsigned int); /* locked inside */
extern struct file *filp_open(const char *, int, int);
extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
@@ -865,7 +880,6 @@
#define putname(name) free_page((unsigned long)(name))
enum {BDEV_FILE, BDEV_SWAP, BDEV_FS, BDEV_RAW};
-extern void kill_fasync(struct fasync_struct *, int, int);
extern int register_blkdev(unsigned int, const char *, struct block_device_operations *);
extern int unregister_blkdev(unsigned int, const char *);
extern struct block_device *bdget(dev_t);
@@ -1058,6 +1072,7 @@
#define user_path_walk_link(name,nd) __user_walk(name, LOOKUP_POSITIVE, nd)
extern void iput(struct inode *);
+extern void force_delete(struct inode *);
extern struct inode * igrab(struct inode *);
extern ino_t iunique(struct super_block *, ino_t);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)