diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 13:49:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-10-28 13:49:34 -0400 |
commit | f362f98e7c445643d27c610bb7a86b79727b592e (patch) | |
tree | 399d9ebccdfbdfe9690ab1403a001d6f08e54b41 /include/linux/fs.h | |
parent | f793f2961170c0b49c1650e69e7825484159ce62 (diff) | |
parent | f3c7691e8d30d88899b514675c7c86d19057b5fd (diff) |
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/hch/vfs-queue: (21 commits)
leases: fix write-open/read-lease race
nfs: drop unnecessary locking in llseek
ext4: replace cut'n'pasted llseek code with generic_file_llseek_size
vfs: add generic_file_llseek_size
vfs: do (nearly) lockless generic_file_llseek
direct-io: merge direct_io_walker into __blockdev_direct_IO
direct-io: inline the complete submission path
direct-io: separate map_bh from dio
direct-io: use a slab cache for struct dio
direct-io: rearrange fields in dio/dio_submit to avoid holes
direct-io: fix a wrong comment
direct-io: separate fields only used in the submission path from struct dio
vfs: fix spinning prevention in prune_icache_sb
vfs: add a comment to inode_permission()
vfs: pass all mask flags check_acl and posix_acl_permission
vfs: add hex format for MAY_* flag values
vfs: indicate that the permission functions take all the MAY_* flags
compat: sync compat_stats with statfs.
vfs: add "device" tag to /proc/self/mountstats
cleanup: vfs: small comment fix for block_invalidatepage
...
Fix up trivial conflict in fs/gfs2/file.c (llseek changes)
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index ba98668a1826..14493a2d5a03 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -58,14 +58,15 @@ struct inodes_stat_t { | |||
58 | 58 | ||
59 | #define NR_FILE 8192 /* this can well be larger on a larger system */ | 59 | #define NR_FILE 8192 /* this can well be larger on a larger system */ |
60 | 60 | ||
61 | #define MAY_EXEC 1 | 61 | #define MAY_EXEC 0x00000001 |
62 | #define MAY_WRITE 2 | 62 | #define MAY_WRITE 0x00000002 |
63 | #define MAY_READ 4 | 63 | #define MAY_READ 0x00000004 |
64 | #define MAY_APPEND 8 | 64 | #define MAY_APPEND 0x00000008 |
65 | #define MAY_ACCESS 16 | 65 | #define MAY_ACCESS 0x00000010 |
66 | #define MAY_OPEN 32 | 66 | #define MAY_OPEN 0x00000020 |
67 | #define MAY_CHDIR 64 | 67 | #define MAY_CHDIR 0x00000040 |
68 | #define MAY_NOT_BLOCK 128 /* called from RCU mode, don't block */ | 68 | /* called from RCU mode, don't block */ |
69 | #define MAY_NOT_BLOCK 0x00000080 | ||
69 | 70 | ||
70 | /* | 71 | /* |
71 | * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond | 72 | * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond |
@@ -963,7 +964,12 @@ struct file { | |||
963 | #define f_dentry f_path.dentry | 964 | #define f_dentry f_path.dentry |
964 | #define f_vfsmnt f_path.mnt | 965 | #define f_vfsmnt f_path.mnt |
965 | const struct file_operations *f_op; | 966 | const struct file_operations *f_op; |
966 | spinlock_t f_lock; /* f_ep_links, f_flags, no IRQ */ | 967 | |
968 | /* | ||
969 | * Protects f_ep_links, f_flags, f_pos vs i_size in lseek SEEK_CUR. | ||
970 | * Must not be taken from IRQ context. | ||
971 | */ | ||
972 | spinlock_t f_lock; | ||
967 | #ifdef CONFIG_SMP | 973 | #ifdef CONFIG_SMP |
968 | int f_sb_list_cpu; | 974 | int f_sb_list_cpu; |
969 | #endif | 975 | #endif |
@@ -2401,8 +2407,8 @@ file_ra_state_init(struct file_ra_state *ra, struct address_space *mapping); | |||
2401 | extern loff_t noop_llseek(struct file *file, loff_t offset, int origin); | 2407 | extern loff_t noop_llseek(struct file *file, loff_t offset, int origin); |
2402 | extern loff_t no_llseek(struct file *file, loff_t offset, int origin); | 2408 | extern loff_t no_llseek(struct file *file, loff_t offset, int origin); |
2403 | extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); | 2409 | extern loff_t generic_file_llseek(struct file *file, loff_t offset, int origin); |
2404 | extern loff_t generic_file_llseek_unlocked(struct file *file, loff_t offset, | 2410 | extern loff_t generic_file_llseek_size(struct file *file, loff_t offset, |
2405 | int origin); | 2411 | int origin, loff_t maxsize); |
2406 | extern int generic_file_open(struct inode * inode, struct file * filp); | 2412 | extern int generic_file_open(struct inode * inode, struct file * filp); |
2407 | extern int nonseekable_open(struct inode * inode, struct file * filp); | 2413 | extern int nonseekable_open(struct inode * inode, struct file * filp); |
2408 | 2414 | ||