diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-03 17:12:40 -0500 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-03-03 17:12:40 -0500 |
| commit | 9643f5d94aadd47a5fa9754fb60f2c957de05903 (patch) | |
| tree | c299736cbcdd7f971c1c308433e248198060fefa /include/linux | |
| parent | 2bd3a997befc226ab4b504f05c5cbba305f3e0e6 (diff) | |
| parent | c44dcc56d2b5c79ba3063d20f76e5347e2e418f6 (diff) | |
Merge branch 'for-fsnotify' into for-linus
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/audit.h | 11 | ||||
| -rw-r--r-- | include/linux/fsnotify.h | 11 | ||||
| -rw-r--r-- | include/linux/magic.h | 1 |
3 files changed, 11 insertions, 12 deletions
diff --git a/include/linux/audit.h b/include/linux/audit.h index 3c7a358241a7..f391d45c8aea 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
| @@ -424,7 +424,7 @@ extern void audit_syscall_exit(int failed, long return_code); | |||
| 424 | extern void __audit_getname(const char *name); | 424 | extern void __audit_getname(const char *name); |
| 425 | extern void audit_putname(const char *name); | 425 | extern void audit_putname(const char *name); |
| 426 | extern void __audit_inode(const char *name, const struct dentry *dentry); | 426 | extern void __audit_inode(const char *name, const struct dentry *dentry); |
| 427 | extern void __audit_inode_child(const char *dname, const struct dentry *dentry, | 427 | extern void __audit_inode_child(const struct dentry *dentry, |
| 428 | const struct inode *parent); | 428 | const struct inode *parent); |
| 429 | extern void __audit_ptrace(struct task_struct *t); | 429 | extern void __audit_ptrace(struct task_struct *t); |
| 430 | 430 | ||
| @@ -442,11 +442,10 @@ static inline void audit_inode(const char *name, const struct dentry *dentry) { | |||
| 442 | if (unlikely(!audit_dummy_context())) | 442 | if (unlikely(!audit_dummy_context())) |
| 443 | __audit_inode(name, dentry); | 443 | __audit_inode(name, dentry); |
| 444 | } | 444 | } |
| 445 | static inline void audit_inode_child(const char *dname, | 445 | static inline void audit_inode_child(const struct dentry *dentry, |
| 446 | const struct dentry *dentry, | ||
| 447 | const struct inode *parent) { | 446 | const struct inode *parent) { |
| 448 | if (unlikely(!audit_dummy_context())) | 447 | if (unlikely(!audit_dummy_context())) |
| 449 | __audit_inode_child(dname, dentry, parent); | 448 | __audit_inode_child(dentry, parent); |
| 450 | } | 449 | } |
| 451 | void audit_core_dumps(long signr); | 450 | void audit_core_dumps(long signr); |
| 452 | 451 | ||
| @@ -544,9 +543,9 @@ extern int audit_signals; | |||
| 544 | #define audit_getname(n) do { ; } while (0) | 543 | #define audit_getname(n) do { ; } while (0) |
| 545 | #define audit_putname(n) do { ; } while (0) | 544 | #define audit_putname(n) do { ; } while (0) |
| 546 | #define __audit_inode(n,d) do { ; } while (0) | 545 | #define __audit_inode(n,d) do { ; } while (0) |
| 547 | #define __audit_inode_child(d,i,p) do { ; } while (0) | 546 | #define __audit_inode_child(i,p) do { ; } while (0) |
| 548 | #define audit_inode(n,d) do { ; } while (0) | 547 | #define audit_inode(n,d) do { ; } while (0) |
| 549 | #define audit_inode_child(d,i,p) do { ; } while (0) | 548 | #define audit_inode_child(i,p) do { ; } while (0) |
| 550 | #define audit_core_dumps(i) do { ; } while (0) | 549 | #define audit_core_dumps(i) do { ; } while (0) |
| 551 | #define auditsc_get_stamp(c,t,s) (0) | 550 | #define auditsc_get_stamp(c,t,s) (0) |
| 552 | #define audit_get_loginuid(t) (-1) | 551 | #define audit_get_loginuid(t) (-1) |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index 936f9aa8bb97..df8fd9a3b214 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
| @@ -65,7 +65,7 @@ static inline void fsnotify_link_count(struct inode *inode) | |||
| 65 | * fsnotify_move - file old_name at old_dir was moved to new_name at new_dir | 65 | * fsnotify_move - file old_name at old_dir was moved to new_name at new_dir |
| 66 | */ | 66 | */ |
| 67 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | 67 | static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, |
| 68 | const char *old_name, const char *new_name, | 68 | const char *old_name, |
| 69 | int isdir, struct inode *target, struct dentry *moved) | 69 | int isdir, struct inode *target, struct dentry *moved) |
| 70 | { | 70 | { |
| 71 | struct inode *source = moved->d_inode; | 71 | struct inode *source = moved->d_inode; |
| @@ -73,6 +73,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
| 73 | u32 fs_cookie = fsnotify_get_cookie(); | 73 | u32 fs_cookie = fsnotify_get_cookie(); |
| 74 | __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM); | 74 | __u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM); |
| 75 | __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO); | 75 | __u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO); |
| 76 | const char *new_name = moved->d_name.name; | ||
| 76 | 77 | ||
| 77 | if (old_dir == new_dir) | 78 | if (old_dir == new_dir) |
| 78 | old_dir_mask |= FS_DN_RENAME; | 79 | old_dir_mask |= FS_DN_RENAME; |
| @@ -103,7 +104,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
| 103 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); | 104 | inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL); |
| 104 | fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 105 | fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
| 105 | } | 106 | } |
| 106 | audit_inode_child(new_name, moved, new_dir); | 107 | audit_inode_child(moved, new_dir); |
| 107 | } | 108 | } |
| 108 | 109 | ||
| 109 | /* | 110 | /* |
| @@ -146,7 +147,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | |||
| 146 | { | 147 | { |
| 147 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, | 148 | inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name, |
| 148 | dentry->d_inode); | 149 | dentry->d_inode); |
| 149 | audit_inode_child(dentry->d_name.name, dentry, inode); | 150 | audit_inode_child(dentry, inode); |
| 150 | 151 | ||
| 151 | fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); | 152 | fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); |
| 152 | } | 153 | } |
| @@ -161,7 +162,7 @@ static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct | |||
| 161 | inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name, | 162 | inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name, |
| 162 | inode); | 163 | inode); |
| 163 | fsnotify_link_count(inode); | 164 | fsnotify_link_count(inode); |
| 164 | audit_inode_child(new_dentry->d_name.name, new_dentry, dir); | 165 | audit_inode_child(new_dentry, dir); |
| 165 | 166 | ||
| 166 | fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0); | 167 | fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0); |
| 167 | } | 168 | } |
| @@ -175,7 +176,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
| 175 | struct inode *d_inode = dentry->d_inode; | 176 | struct inode *d_inode = dentry->d_inode; |
| 176 | 177 | ||
| 177 | inotify_inode_queue_event(inode, mask, 0, dentry->d_name.name, d_inode); | 178 | inotify_inode_queue_event(inode, mask, 0, dentry->d_name.name, d_inode); |
| 178 | audit_inode_child(dentry->d_name.name, dentry, inode); | 179 | audit_inode_child(dentry, inode); |
| 179 | 180 | ||
| 180 | fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); | 181 | fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); |
| 181 | } | 182 | } |
diff --git a/include/linux/magic.h b/include/linux/magic.h index 76285e01b39e..eb9800f05782 100644 --- a/include/linux/magic.h +++ b/include/linux/magic.h | |||
| @@ -52,7 +52,6 @@ | |||
| 52 | #define CGROUP_SUPER_MAGIC 0x27e0eb | 52 | #define CGROUP_SUPER_MAGIC 0x27e0eb |
| 53 | 53 | ||
| 54 | #define FUTEXFS_SUPER_MAGIC 0xBAD1DEA | 54 | #define FUTEXFS_SUPER_MAGIC 0xBAD1DEA |
| 55 | #define INOTIFYFS_SUPER_MAGIC 0x2BAD1DEA | ||
| 56 | 55 | ||
| 57 | #define STACK_END_MAGIC 0x57AC6E9D | 56 | #define STACK_END_MAGIC 0x57AC6E9D |
| 58 | 57 | ||
