mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
[PATCH] r/o bind mounts: create helper to drop file write access
If someone decides to demote a file from r/w to just r/o, they can use this same code as __fput(). NFS does just that, and will use this in the next patch. AV: drop write access in __fput() only after we evict from file list. Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Cc: Erez Zadok <ezk@cs.sunysb.edu> Cc: Trond Myklebust <trond.myklebust@fys.uio.no> Cc: "J Bruce Fields" <bfields@fieldses.org> Acked-by: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
8366025eb8
commit
aceaf78da9
3 changed files with 22 additions and 3 deletions
|
@ -61,6 +61,7 @@ extern struct kmem_cache *filp_cachep;
|
|||
|
||||
extern void __fput(struct file *);
|
||||
extern void fput(struct file *);
|
||||
extern void drop_file_write_access(struct file *file);
|
||||
|
||||
struct file_operations;
|
||||
struct vfsmount;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue