diff options
Diffstat (limited to 'mm/filemap.c')
-rw-r--r-- | mm/filemap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c index f8c69273c37f..f5769b4dc075 100644 --- a/mm/filemap.c +++ b/mm/filemap.c | |||
@@ -1766,7 +1766,7 @@ int should_remove_suid(struct dentry *dentry) | |||
1766 | if (unlikely((mode & S_ISGID) && (mode & S_IXGRP))) | 1766 | if (unlikely((mode & S_ISGID) && (mode & S_IXGRP))) |
1767 | kill |= ATTR_KILL_SGID; | 1767 | kill |= ATTR_KILL_SGID; |
1768 | 1768 | ||
1769 | if (unlikely(kill && !capable(CAP_FSETID))) | 1769 | if (unlikely(kill && !capable(CAP_FSETID) && S_ISREG(mode))) |
1770 | return kill; | 1770 | return kill; |
1771 | 1771 | ||
1772 | return 0; | 1772 | return 0; |