X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Flinux%2Ffs.h;h=37ad9a730a896247f421ba742dfd29192c83d924;hb=49624efa65ac9889f4e7c7b2452b2e6ce42ba37d;hp=a6074cdb77986f11e2ae663fbc61d1ec3a56ee7c;hpb=f7464060f7ab9a2424428008f0ee9f1e267e410f;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/include/linux/fs.h b/include/linux/fs.h index a6074cd..37ad9a7 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3023,15 +3023,20 @@ static inline void file_end_write(struct file *file) } /* + * This is used for regular files where some users -- especially the + * currently executed binary in a process, previously handled via + * VM_DENYWRITE -- cannot handle concurrent write (and maybe mmap + * read-write shared) accesses. + * * get_write_access() gets write permission for a file. * put_write_access() releases this write permission. - * This is used for regular files. - * We cannot support write (and maybe mmap read-write shared) accesses and - * MAP_DENYWRITE mmappings simultaneously. The i_writecount field of an inode - * can have the following values: - * 0: no writers, no VM_DENYWRITE mappings - * < 0: (-i_writecount) vm_area_structs with VM_DENYWRITE set exist - * > 0: (i_writecount) users are writing to the file. + * deny_write_access() denies write access to a file. + * allow_write_access() re-enables write access to a file. + * + * The i_writecount field of an inode can have the following values: + * 0: no write access, no denied write access + * < 0: (-i_writecount) users that denied write access to the file. + * > 0: (i_writecount) users that have write access to the file. * * Normally we operate on that counter with atomic_{inc,dec} and it's safe * except for the cases where we don't hold i_writecount yet. Then we need to