aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 2ed8b0389c51..5de7633e1dbe 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1758,8 +1758,9 @@ static int __remove_suid(struct dentry *dentry, int kill)
1758 return notify_change(dentry, &newattrs); 1758 return notify_change(dentry, &newattrs);
1759} 1759}
1760 1760
1761int remove_suid(struct dentry *dentry) 1761int file_remove_suid(struct file *file)
1762{ 1762{
1763 struct dentry *dentry = file->f_path.dentry;
1763 int killsuid = should_remove_suid(dentry); 1764 int killsuid = should_remove_suid(dentry);
1764 int killpriv = security_inode_need_killpriv(dentry); 1765 int killpriv = security_inode_need_killpriv(dentry);
1765 int error = 0; 1766 int error = 0;
@@ -1773,7 +1774,7 @@ int remove_suid(struct dentry *dentry)
1773 1774
1774 return error; 1775 return error;
1775} 1776}
1776EXPORT_SYMBOL(remove_suid); 1777EXPORT_SYMBOL(file_remove_suid);
1777 1778
1778static size_t __iovec_copy_from_user_inatomic(char *vaddr, 1779static size_t __iovec_copy_from_user_inatomic(char *vaddr,
1779 const struct iovec *iov, size_t base, size_t bytes) 1780 const struct iovec *iov, size_t base, size_t bytes)
@@ -2529,7 +2530,7 @@ __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov,
2529 if (count == 0) 2530 if (count == 0)
2530 goto out; 2531 goto out;
2531 2532
2532 err = remove_suid(file->f_path.dentry); 2533 err = file_remove_suid(file);
2533 if (err) 2534 if (err)
2534 goto out; 2535 goto out;
2535 2536