[lkml]   [1997]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: eject /dev/cdrom --> oops. (a better patch)
David Woodhouse wrote:
> This, one the other hand, is, although I'm not sure it's the _right_ fix.
> This patch still puts the check into get_filesystem_info, but it also makes
> sure that do_mount will remove a vfsmnt entry after failing to complete the
> mount, rather than leaving a half-initialised entry.
> This has the side-effect that it will remove any existing vfsmnt entry for the
> device in question if a mount fails. As I understand it, there shouldn't be
> one anyway, but it's a case that the existing code checked for.
> Would someone who knows what they're talking about care to pass judgement?

Perhaps I've missed something, but in looking at the 2.1.60 do_mount
source I don't see any cases where you get a partial vfsmount
structure. If add_vfsmnt returns a structure, it should be OK; if it
returns NULL, there's nothing to clean up.

OTOH, add_vfsmnt itself could use a little more error-checking.


 \ /
  Last update: 2005-03-22 13:40    [W:0.050 / U:1.860 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site