]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/block/loop.c
[PATCH] mutex subsystem, semaphore to mutex: VFS, ->i_sem
[linux-2.6-omap-h63xx.git] / drivers / block / loop.c
index a452b13620a228739fe60f296e85720643bf03e0..bed9ad76c04c038f9516fb4d2beeec4218e2549e 100644 (file)
@@ -215,7 +215,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec,
        unsigned offset, bv_offs;
        int len, ret;
 
-       down(&mapping->host->i_sem);
+       mutex_lock(&mapping->host->i_mutex);
        index = pos >> PAGE_CACHE_SHIFT;
        offset = pos & ((pgoff_t)PAGE_CACHE_SIZE - 1);
        bv_offs = bvec->bv_offset;
@@ -278,7 +278,7 @@ static int do_lo_send_aops(struct loop_device *lo, struct bio_vec *bvec,
        }
        ret = 0;
 out:
-       up(&mapping->host->i_sem);
+       mutex_unlock(&mapping->host->i_mutex);
        return ret;
 unlock:
        unlock_page(page);