diff options
author | James Morris <jmorris@namei.org> | 2009-02-05 19:01:45 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-02-05 19:01:45 -0500 |
commit | cb5629b10d64a8006622ce3a52bc887d91057d69 (patch) | |
tree | 7c06d8f30783115e3384721046258ce615b129c5 /fs/jfs/super.c | |
parent | 8920d5ad6ba74ae8ab020e90cc4d976980e68701 (diff) | |
parent | f01d1d546abb2f4028b5299092f529eefb01253a (diff) |
Merge branch 'master' into next
Conflicts:
fs/namei.c
Manually merged per:
diff --cc fs/namei.c
index 734f2b5,bbc15c2..0000000
--- a/fs/namei.c
+++ b/fs/namei.c
@@@ -860,9 -848,8 +849,10 @@@ static int __link_path_walk(const char
nd->flags |= LOOKUP_CONTINUE;
err = exec_permission_lite(inode);
if (err == -EAGAIN)
- err = vfs_permission(nd, MAY_EXEC);
+ err = inode_permission(nd->path.dentry->d_inode,
+ MAY_EXEC);
+ if (!err)
+ err = ima_path_check(&nd->path, MAY_EXEC);
if (err)
break;
@@@ -1525,14 -1506,9 +1509,14 @@@ int may_open(struct path *path, int acc
flag &= ~O_TRUNC;
}
- error = vfs_permission(nd, acc_mode);
+ error = inode_permission(inode, acc_mode);
if (error)
return error;
+
- error = ima_path_check(&nd->path,
++ error = ima_path_check(path,
+ acc_mode & (MAY_READ | MAY_WRITE | MAY_EXEC));
+ if (error)
+ return error;
/*
* An append-only file must be opened in append mode for writing.
*/
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs/jfs/super.c')
-rw-r--r-- | fs/jfs/super.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 0dae345e481b..b37d1f78b854 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -543,7 +543,7 @@ out_kfree: | |||
543 | return ret; | 543 | return ret; |
544 | } | 544 | } |
545 | 545 | ||
546 | static void jfs_write_super_lockfs(struct super_block *sb) | 546 | static int jfs_freeze(struct super_block *sb) |
547 | { | 547 | { |
548 | struct jfs_sb_info *sbi = JFS_SBI(sb); | 548 | struct jfs_sb_info *sbi = JFS_SBI(sb); |
549 | struct jfs_log *log = sbi->log; | 549 | struct jfs_log *log = sbi->log; |
@@ -553,9 +553,10 @@ static void jfs_write_super_lockfs(struct super_block *sb) | |||
553 | lmLogShutdown(log); | 553 | lmLogShutdown(log); |
554 | updateSuper(sb, FM_CLEAN); | 554 | updateSuper(sb, FM_CLEAN); |
555 | } | 555 | } |
556 | return 0; | ||
556 | } | 557 | } |
557 | 558 | ||
558 | static void jfs_unlockfs(struct super_block *sb) | 559 | static int jfs_unfreeze(struct super_block *sb) |
559 | { | 560 | { |
560 | struct jfs_sb_info *sbi = JFS_SBI(sb); | 561 | struct jfs_sb_info *sbi = JFS_SBI(sb); |
561 | struct jfs_log *log = sbi->log; | 562 | struct jfs_log *log = sbi->log; |
@@ -568,6 +569,7 @@ static void jfs_unlockfs(struct super_block *sb) | |||
568 | else | 569 | else |
569 | txResume(sb); | 570 | txResume(sb); |
570 | } | 571 | } |
572 | return 0; | ||
571 | } | 573 | } |
572 | 574 | ||
573 | static int jfs_get_sb(struct file_system_type *fs_type, | 575 | static int jfs_get_sb(struct file_system_type *fs_type, |
@@ -735,8 +737,8 @@ static const struct super_operations jfs_super_operations = { | |||
735 | .delete_inode = jfs_delete_inode, | 737 | .delete_inode = jfs_delete_inode, |
736 | .put_super = jfs_put_super, | 738 | .put_super = jfs_put_super, |
737 | .sync_fs = jfs_sync_fs, | 739 | .sync_fs = jfs_sync_fs, |
738 | .write_super_lockfs = jfs_write_super_lockfs, | 740 | .freeze_fs = jfs_freeze, |
739 | .unlockfs = jfs_unlockfs, | 741 | .unfreeze_fs = jfs_unfreeze, |
740 | .statfs = jfs_statfs, | 742 | .statfs = jfs_statfs, |
741 | .remount_fs = jfs_remount, | 743 | .remount_fs = jfs_remount, |
742 | .show_options = jfs_show_options, | 744 | .show_options = jfs_show_options, |