lkml.org 
[lkml]   [2012]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 00/21] vfs: atomic open v6 (part 2)
Date
Al Viro <viro@ZenIV.linux.org.uk> writes:

>
> I'm more or less OK with that; one major exception is your struct opendata.
> I think it needs to go. Really. You are using it to store three references -
> file, vfsmount and dentry.

That's not the real purpose. We can store those in struct file, I can
see that.

The real reason I went with a separate and opaque type there is that
that thing is simply not an open file. If it was a struct file and the
filesystem would do an fput() on it by accident it would lead to really
ugly problems, and the complier would have no chance at detecting it.

If it's a separate type (and it can have just that struct file embedded
into it) then such mistakes are instantly detected by the compiler

So I really don't see the downsides of having a new type for that.

Thanks,
Miklos


\
 
 \ /
  Last update: 2012-06-11 18:03    [from the cache]
©2003-2014 Jasper Spaans. Advertise on this site