lkml.org 
[lkml]   [2001]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux 2.4.10-pre11
On Thu, Sep 20, 2001 at 09:50:52PM -0400, Alexander Viro wrote:
> Andrea, what's the point of making blkdev_get() bump ->bd_count
> in case of success and blkdev_put() - drop it? We _do_ grab a reference
> before calling blkdev_get() - any place where we don't is an immediately
> oopsable hole both in the old an in the new tree. Notice that you
> do down(&bdev->bd_sem) before that increment of refcount, so if caller
> doesn't hold a reference we are toast. What's going on there?

I just wanted to make sure the bdev couldn't be released under us by
owning a reference for the whole duration of the blkdev_get/put. But
requiring the caller to hold the reference for us seems saner since the
caller will have to pass the bdev as parameter anyways, so yes it seems
superflous.

Andrea
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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