aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-12-16 06:38:01 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2009-12-16 12:16:47 -0500
commit1429b3eca23818f87f9fa569a15d9816de81f698 (patch)
tree3100f009ec8863ee4692ee197b8e0c16c11258e6 /fs/namei.c
parentb65a9cfc2c38eebc33533280b8ad5841caee8b6e (diff)
Untangling ima mess, part 3: kill dead code in ima
Kill the 'update' argument of ima_path_check(), kill dead code in ima. Current rules: ima counters are bumped at the same time when the file switches from put_filp() fodder to fput() one. Which happens exactly in two places - alloc_file() and __dentry_open(). Nothing else needs to do that at all. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index c530e5d32f12..a765e7a741f4 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1686,7 +1686,7 @@ do_last:
1686 path_put(&nd.root); 1686 path_put(&nd.root);
1687 if (!IS_ERR(filp)) { 1687 if (!IS_ERR(filp)) {
1688 error = ima_path_check(&filp->f_path, filp->f_mode & 1688 error = ima_path_check(&filp->f_path, filp->f_mode &
1689 (MAY_READ | MAY_WRITE | MAY_EXEC), 0); 1689 (MAY_READ | MAY_WRITE | MAY_EXEC));
1690 if (error) { 1690 if (error) {
1691 fput(filp); 1691 fput(filp);
1692 filp = ERR_PTR(error); 1692 filp = ERR_PTR(error);
@@ -1747,7 +1747,7 @@ ok:
1747 filp = nameidata_to_filp(&nd, open_flag); 1747 filp = nameidata_to_filp(&nd, open_flag);
1748 if (!IS_ERR(filp)) { 1748 if (!IS_ERR(filp)) {
1749 error = ima_path_check(&filp->f_path, filp->f_mode & 1749 error = ima_path_check(&filp->f_path, filp->f_mode &
1750 (MAY_READ | MAY_WRITE | MAY_EXEC), 0); 1750 (MAY_READ | MAY_WRITE | MAY_EXEC));
1751 if (error) { 1751 if (error) {
1752 fput(filp); 1752 fput(filp);
1753 filp = ERR_PTR(error); 1753 filp = ERR_PTR(error);