[lkml]   [2003]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH ?] iprune_sem
On Sun, 10 Aug 2003, Frederick, Fabian wrote:
> Someone could tell me why we don't use iprune_sem in get_new_inode
> like this ?

1. iprune_sem was introduced for a specific umount versus prune race,
see the comment upon it: no bearing on get_new_inode whatsoever.
2. How would downing a semaphore just before the spin_lock,
upping it just after the spin_unlock, serve any purpose?
3. If it were useful, it should be upped on the exceptional path too.
4. Don't change "locked inode" comment to "inode unlocked": I_LOCK is set.
5. But worst of all, you remove the whole point of the old = find_inode.

I think you're trying to say, a semaphore (not placed where you have it)
could be used to prevent two tasks from allocating the same inode at the
same time. Yes, but would single-thread inode allocation disastrously:
much more efficient for both to try and check - as get_new_inode does.


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:47    [W:0.039 / U:0.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site