aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 67e6732d4fdc..7f61227827d7 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -9,6 +9,7 @@
9#include <linux/config.h> 9#include <linux/config.h>
10#include <linux/limits.h> 10#include <linux/limits.h>
11#include <linux/ioctl.h> 11#include <linux/ioctl.h>
12#include <linux/rcuref.h>
12 13
13/* 14/*
14 * It's silly to have NR_OPEN bigger than NR_FILE, but you can change 15 * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
@@ -69,6 +70,7 @@ extern int dir_notify_enable;
69#define READ 0 70#define READ 0
70#define WRITE 1 71#define WRITE 1
71#define READA 2 /* read-ahead - don't block if no resources */ 72#define READA 2 /* read-ahead - don't block if no resources */
73#define SWRITE 3 /* for ll_rw_block() - wait for buffer lock */
72#define SPECIAL 4 /* For non-blockdevice requests in request queue */ 74#define SPECIAL 4 /* For non-blockdevice requests in request queue */
73#define READ_SYNC (READ | (1 << BIO_RW_SYNC)) 75#define READ_SYNC (READ | (1 << BIO_RW_SYNC))
74#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC)) 76#define WRITE_SYNC (WRITE | (1 << BIO_RW_SYNC))
@@ -281,19 +283,9 @@ struct iattr {
281 struct timespec ia_atime; 283 struct timespec ia_atime;
282 struct timespec ia_mtime; 284 struct timespec ia_mtime;
283 struct timespec ia_ctime; 285 struct timespec ia_ctime;
284 unsigned int ia_attr_flags;
285}; 286};
286 287
287/* 288/*
288 * This is the inode attributes flag definitions
289 */
290#define ATTR_FLAG_SYNCRONOUS 1 /* Syncronous write */
291#define ATTR_FLAG_NOATIME 2 /* Don't update atime */
292#define ATTR_FLAG_APPEND 4 /* Append-only file */
293#define ATTR_FLAG_IMMUTABLE 8 /* Immutable file */
294#define ATTR_FLAG_NODIRATIME 16 /* Don't update atime for directory */
295
296/*
297 * Includes for diskquotas. 289 * Includes for diskquotas.
298 */ 290 */
299#include <linux/quota.h> 291#include <linux/quota.h>
@@ -594,7 +586,6 @@ struct file {
594 unsigned int f_uid, f_gid; 586 unsigned int f_uid, f_gid;
595 struct file_ra_state f_ra; 587 struct file_ra_state f_ra;
596 588
597 size_t f_maxcount;
598 unsigned long f_version; 589 unsigned long f_version;
599 void *f_security; 590 void *f_security;
600 591
@@ -607,12 +598,13 @@ struct file {
607 spinlock_t f_ep_lock; 598 spinlock_t f_ep_lock;
608#endif /* #ifdef CONFIG_EPOLL */ 599#endif /* #ifdef CONFIG_EPOLL */
609 struct address_space *f_mapping; 600 struct address_space *f_mapping;
601 struct rcu_head f_rcuhead;
610}; 602};
611extern spinlock_t files_lock; 603extern spinlock_t files_lock;
612#define file_list_lock() spin_lock(&files_lock); 604#define file_list_lock() spin_lock(&files_lock);
613#define file_list_unlock() spin_unlock(&files_lock); 605#define file_list_unlock() spin_unlock(&files_lock);
614 606
615#define get_file(x) atomic_inc(&(x)->f_count) 607#define get_file(x) rcuref_inc(&(x)->f_count)
616#define file_count(x) atomic_read(&(x)->f_count) 608#define file_count(x) atomic_read(&(x)->f_count)
617 609
618#define MAX_NON_LFS ((1UL<<31) - 1) 610#define MAX_NON_LFS ((1UL<<31) - 1)
@@ -1291,6 +1283,7 @@ static inline int break_lease(struct inode *inode, unsigned int mode)
1291/* fs/open.c */ 1283/* fs/open.c */
1292 1284
1293extern int do_truncate(struct dentry *, loff_t start); 1285extern int do_truncate(struct dentry *, loff_t start);
1286extern long do_sys_open(const char __user *filename, int flags, int mode);
1294extern struct file *filp_open(const char *, int, int); 1287extern struct file *filp_open(const char *, int, int);
1295extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); 1288extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
1296extern int filp_close(struct file *, fl_owner_t id); 1289extern int filp_close(struct file *, fl_owner_t id);