Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

linux-next: manual merge of the fsnotify tree with the vfs tree

0 views
Skip to first unread message

Stephen Rothwell

unread,
Feb 1, 2010, 11:30:01 PM2/1/10
to
Hi Eric,

Today's linux-next merge of the fsnotify tree got a conflict in
kernel/audit_tree.c between commit
1a527a2c261ad15dd15d5ee7763d3afcd8c084e9 ("new helper: iterate_mounts()")
from the vfs tree and commits 0bb4b47eebb9d06546c9beae77dc283fbb43ea35
("audit: reimplement audit_trees using fsnotify rather than inotify")
and 98d4301cc7c8828ea41432a62a3216212ffda250 ("fsnotify: put inode
specific fields in an fsnotify_mark in a union") from the fsnotify tree.

I think I fixed it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell s...@canb.auug.org.au

diff --cc kernel/audit_tree.c
index 028e856,a9167f9..0000000
--- a/kernel/audit_tree.c
+++ b/kernel/audit_tree.c
@@@ -581,12 -594,20 +598,13 @@@ void audit_trim_trees(void
if (!root_mnt)
goto skip_it;

- list_add_tail(&list, &root_mnt->mnt_list);
spin_lock(&hash_lock);
list_for_each_entry(node, &tree->chunks, list) {
- struct inode *inode = find_chunk(node)->watch.inode;
- struct audit_chunk *chunk = find_chunk(node);
+ /* this could be NULL if the watch is dieing else where... */
- struct inode *inode = chunk->mark.i.inode;
- struct vfsmount *mnt;
++ struct inode *inode = find_chunk(node)->mark.i.inode;
node->index |= 1U<<31;
- list_for_each_entry(mnt, &list, mnt_list) {
- if (mnt->mnt_root->d_inode == inode) {
- node->index &= ~(1U<<31);
- break;
- }
- }
+ if (iterate_mounts(compare_root, inode, root_mnt))
+ node->index &= ~(1U<<31);
}
spin_unlock(&hash_lock);
trim_marked(tree);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majo...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Stephen Rothwell

unread,
Feb 9, 2010, 12:40:02 AM2/9/10
to
Hi Eric,

Today's linux-next merge of the fsnotify tree got a conflict in

fs/namei.c between commit 123df2944c436c80640c4281c5bc9c7950b18687 ("Lose
the new_name argument of fsnotify_move()") from the vfs tree and commit
2df5764e29a813f6ba63be094ab8aadc704a78fd ("fsnotify: use unsigned char *
for dentry->d_name.name") from the fsnotify tree.

The former removed the code changed by the latter, so I used the former.


--
Cheers,
Stephen Rothwell s...@canb.auug.org.au

http://www.canb.auug.org.au/~sfr/

Stephen Rothwell

unread,
Feb 9, 2010, 12:40:02 AM2/9/10
to
Hi Eric,

Today's linux-next merge of the fsnotify tree got a conflict in

include/linux/audit.h between commit
cccc6bba3f771ef29b33e4f79e70ebc3dba245b0 ("Lose the first argument of
audit_inode_child()") from the vfs tree and commit


2df5764e29a813f6ba63be094ab8aadc704a78fd ("fsnotify: use unsigned char *
for dentry->d_name.name") from the fsnotify tree.

The former removed the bits changed by the latter, so I used the former.

Stephen Rothwell

unread,
Feb 9, 2010, 12:40:02 AM2/9/10
to
Hi Eric,

Today's linux-next merge of the fsnotify tree got a conflict in

kernel/auditsc.c between commit cccc6bba3f771ef29b33e4f79e70ebc3dba245b0


("Lose the first argument of audit_inode_child()") from the vfs tree and
commit 2df5764e29a813f6ba63be094ab8aadc704a78fd ("fsnotify: use unsigned
char * for dentry->d_name.name") from the fsnotify tree.

The former removed the code changed by the latter, so I used the former.

Stephen Rothwell

unread,
Feb 9, 2010, 12:40:02 AM2/9/10
to
Hi Eric,

Today's linux-next merge of the fsnotify tree got a conflict in

include/linux/fsnotify.h between commits


123df2944c436c80640c4281c5bc9c7950b18687 ("Lose the new_name argument of

fsnotify_move()") and cccc6bba3f771ef29b33e4f79e70ebc3dba245b0 ("Lose the
first argument of audit_inode_child()") from the vfs tree and commits
8b37e6e1cdff433157a7ac8448789e23d0f581b9 ("inotify: remove inotify in
kernel interface") and 2df5764e29a813f6ba63be094ab8aadc704a78fd


("fsnotify: use unsigned char * for dentry->d_name.name") from the
fsnotify tree.

I fixed it up (see below) and can carry the fixes as necessary.


--
Cheers,
Stephen Rothwell s...@canb.auug.org.au

diff --cc include/linux/fsnotify.h
index df8fd9a,bd99bf5..0000000
--- a/include/linux/fsnotify.h
+++ b/include/linux/fsnotify.h
@@@ -65,11 -77,12 +77,10 @@@ static inline void fsnotify_link_count(
* fsnotify_move - file old_name at old_dir was moved to new_name at new_dir
*/
static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir,
- const char *old_name,
+ const unsigned char *old_name,
- const unsigned char *new_name,
- int isdir, struct inode *target,
- struct dentry *moved)
+ int isdir, struct inode *target, struct dentry *moved)
{
struct inode *source = moved->d_inode;
- u32 in_cookie = inotify_get_cookie();
u32 fs_cookie = fsnotify_get_cookie();
__u32 old_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_FROM);
__u32 new_dir_mask = (FS_EVENT_ON_CHILD | FS_MOVED_TO);
@@@ -87,24 -98,13 +97,12 @@@
fsnotify(old_dir, old_dir_mask, old_dir, FSNOTIFY_EVENT_INODE, old_name, fs_cookie);
fsnotify(new_dir, new_dir_mask, new_dir, FSNOTIFY_EVENT_INODE, new_name, fs_cookie);

- if (target) {
- inotify_inode_queue_event(target, IN_DELETE_SELF, 0, NULL, NULL);
- inotify_inode_is_dead(target);
-
- /* this is really a link_count change not a removal */
+ if (target)
fsnotify_link_count(target);
- }

- if (source) {
- inotify_inode_queue_event(source, IN_MOVE_SELF, 0, NULL, NULL);
+ if (source)
fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0);
- }
-
- audit_inode_child(new_name, moved, new_dir);
+ audit_inode_child(moved, new_dir);
}

/*
@@@ -145,9 -150,7 +148,7 @@@ static inline void fsnotify_inoderemove
*/
static inline void fsnotify_create(struct inode *inode, struct dentry *dentry)
{
- inotify_inode_queue_event(inode, IN_CREATE, 0, dentry->d_name.name,
- dentry->d_inode);
- audit_inode_child(dentry->d_name.name, dentry, inode);
+ audit_inode_child(dentry, inode);

fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0);
}
@@@ -159,10 -162,8 +160,8 @@@
*/
static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct dentry *new_dentry)
{
- inotify_inode_queue_event(dir, IN_CREATE, 0, new_dentry->d_name.name,
- inode);
fsnotify_link_count(inode);
- audit_inode_child(new_dentry->d_name.name, new_dentry, dir);
+ audit_inode_child(new_dentry, dir);

fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0);
}
@@@ -175,8 -176,7 +174,7 @@@ static inline void fsnotify_mkdir(struc
__u32 mask = (FS_CREATE | FS_IN_ISDIR);
struct inode *d_inode = dentry->d_inode;

- inotify_inode_queue_event(inode, mask, 0, dentry->d_name.name, d_inode);
- audit_inode_child(dentry->d_name.name, dentry, inode);
+ audit_inode_child(dentry, inode);

fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0);

Al Viro

unread,
Feb 9, 2010, 12:50:01 AM2/9/10
to
On Tue, Feb 09, 2010 at 04:37:08PM +1100, Stephen Rothwell wrote:
> Hi Eric,
>
> Today's linux-next merge of the fsnotify tree got a conflict in
> fs/namei.c between commit 123df2944c436c80640c4281c5bc9c7950b18687 ("Lose
> the new_name argument of fsnotify_move()") from the vfs tree and commit
> 2df5764e29a813f6ba63be094ab8aadc704a78fd ("fsnotify: use unsigned char *
> for dentry->d_name.name") from the fsnotify tree.
>
> The former removed the code changed by the latter, so I used the former.

FWIW, I've put two commits (audit_inode_child and fsnotify_move ones) into
a new not-for-rebase branch (for-fsnotify) and told Eric, so hopefully
he'll just pull it into fsnotify tree.

Stephen Rothwell

unread,
Feb 9, 2010, 1:10:01 AM2/9/10
to
Hi Al,

On Tue, 9 Feb 2010 05:45:22 +0000 Al Viro <vi...@ZenIV.linux.org.uk> wrote:
>
> FWIW, I've put two commits (audit_inode_child and fsnotify_move ones) into
> a new not-for-rebase branch (for-fsnotify) and told Eric, so hopefully
> he'll just pull it into fsnotify tree.

Excellent, thanks.

Eric Paris

unread,
Feb 9, 2010, 8:10:02 AM2/9/10
to
On Tue, 2010-02-09 at 05:45 +0000, Al Viro wrote:
> On Tue, Feb 09, 2010 at 04:37:08PM +1100, Stephen Rothwell wrote:
> > Hi Eric,
> >
> > Today's linux-next merge of the fsnotify tree got a conflict in
> > fs/namei.c between commit 123df2944c436c80640c4281c5bc9c7950b18687 ("Lose
> > the new_name argument of fsnotify_move()") from the vfs tree and commit
> > 2df5764e29a813f6ba63be094ab8aadc704a78fd ("fsnotify: use unsigned char *
> > for dentry->d_name.name") from the fsnotify tree.
> >
> > The former removed the code changed by the latter, so I used the former.
>
> FWIW, I've put two commits (audit_inode_child and fsnotify_move ones) into
> a new not-for-rebase branch (for-fsnotify) and told Eric, so hopefully
> he'll just pull it into fsnotify tree.

I know I merged it yesterday, but now I can't for the life of me find
the branch I merged it onto, obviously it wasn't my for-next branch.
I'm so confused. Anyway, yes, I'll merge it again right now.....

-Eric

0 new messages