X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=include%2Flinux%2Ffs.h;h=ebfde04bca0683f1e2ecd2aa5c273b943eb7dfb9;hb=9c225f2655e36a4;hp=60829565e5522a2c68f489665909d39f65230a25;hpb=54dfffde22ee5ac5a6f912eb451b52683ef3ea7f;p=~andy%2Flinux diff --git a/include/linux/fs.h b/include/linux/fs.h index 60829565e55..ebfde04bca0 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -123,6 +123,9 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, /* File is opened with O_PATH; almost nothing can be done with it */ #define FMODE_PATH ((__force fmode_t)0x4000) +/* File needs atomic accesses to f_pos */ +#define FMODE_ATOMIC_POS ((__force fmode_t)0x8000) + /* File was opened by fanotify and shouldn't generate fanotify events */ #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) @@ -780,13 +783,14 @@ struct file { const struct file_operations *f_op; /* - * Protects f_ep_links, f_flags, f_pos vs i_size in lseek SEEK_CUR. + * Protects f_ep_links, f_flags. * Must not be taken from IRQ context. */ spinlock_t f_lock; atomic_long_t f_count; unsigned int f_flags; fmode_t f_mode; + struct mutex f_pos_lock; loff_t f_pos; struct fown_struct f_owner; const struct cred *f_cred;