mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
don't bother with {get,put}_write_access() on non-regular files
it's pointless and actually leads to wrong behaviour in at least one moderately convoluted case (pipe(), close one end, try to get to another via /proc/*/fd and run into ETXTBUSY). Cc: stable@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
44ba8406d0
commit
dd20908a8a
2 changed files with 9 additions and 21 deletions
|
@ -209,10 +209,10 @@ static void drop_file_write_access(struct file *file)
|
|||
struct dentry *dentry = file->f_path.dentry;
|
||||
struct inode *inode = dentry->d_inode;
|
||||
|
||||
put_write_access(inode);
|
||||
|
||||
if (special_file(inode->i_mode))
|
||||
return;
|
||||
|
||||
put_write_access(inode);
|
||||
if (file_check_writeable(file) != 0)
|
||||
return;
|
||||
__mnt_drop_write(mnt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue