LWN.net Logo

How to ruin Linus's patch

How to ruin Linus's patch

Posted Jul 19, 2011 23:18 UTC (Tue) by neilbrown (subscriber, #359)
Parent article: How to ruin Linus's vacation

I'm trying to understand Linus' patch.

Moving the assignment to *inode from the start to the end makes lots of sense.

The other mucking about with seqcount doesn't make any sense to me at all.

What exactly is the read_seqcount_retry on path->dentry->d_seq trying to protect? That dentry is the mounted-on dentry so it is pinned and cannot be renamed or deleted.

About the only thing I can think of that might need to be protected against at this point is the mount being unmounted - but if that were the goal of the code I would have expected a comment to that effect, and it doesn't seem like the right place for it anyway..

Any ideas?


(Log in to post comments)

How to ruin Linus's patch

Posted Jul 19, 2011 23:47 UTC (Tue) by viro (subscriber, #7872) [Link]

No, you are right - the check is BUG_ON() misspelled. umount *can't* happen
at that point - we are holding vfsmount_lock all the way through RCU
walk.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds