[lkml]   [2002]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] Replace exec_permission_lite() with inlined vfs_permission()

On Thu, 2 May 2002, Paul Menage wrote:

> Since exec_permission_lite() is now basically an inlined and
> constant-propagated duplicate of vfs_permission(), this patch drops
> exec_permission_lite() and makes vfs_permission() inlined (but not
> static) and calls it from link_path_walk() if the inode doesn't have an
> i_op->permission() method.

IMO it's a bad idea. In many cases we have ->permission() but it's
perfectly OK with being called under dcache_lock - either always or
in (fs-specific) "fast case".

I would prefer ->permission_light() that would always be called
under dcache_lock and besides the usual values could return -EAGAIN.
In that case ->permission() would be called in a normal way.

Corresponding permission_light(9) and permission(9) would be used
in obvious way.

vfs_permission() is just a default value of ->permission() - in effect
you are doing an equivalent of
if (inode->i_op->permission == vfs_permission)
/* we know it's OK to call under dcache_lock */
- just that we represent vfs_permission as NULL in i_op. The reason
why it's Not Nice(tm) should be obvious...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

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