]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/xfs/xfs_iget.c
ide: Add tx4939ide driver (v6)
[linux-2.6-omap-h63xx.git] / fs / xfs / xfs_iget.c
index 539c2dd8eae8b8d9f42b706d42d1ebc4727c53ec..e229e9e001c291fa556c043cf79c9070743675e7 100644 (file)
@@ -216,7 +216,14 @@ finish_inode:
        mrlock_init(&ip->i_iolock, MRLOCK_BARRIER, "xfsio", ip->i_ino);
        init_waitqueue_head(&ip->i_ipin_wait);
        atomic_set(&ip->i_pincount, 0);
-       initnsema(&ip->i_flock, 1, "xfsfino");
+
+       /*
+        * Because we want to use a counting completion, complete
+        * the flush completion once to allow a single access to
+        * the flush completion without blocking.
+        */
+       init_completion(&ip->i_flush);
+       complete(&ip->i_flush);
 
        if (lock_flags)
                xfs_ilock(ip, lock_flags);
@@ -783,26 +790,3 @@ xfs_isilocked(
 }
 #endif
 
-/*
- * The following three routines simply manage the i_flock
- * semaphore embedded in the inode.  This semaphore synchronizes
- * processes attempting to flush the in-core inode back to disk.
- */
-void
-xfs_iflock(xfs_inode_t *ip)
-{
-       psema(&(ip->i_flock), PINOD|PLTWAIT);
-}
-
-int
-xfs_iflock_nowait(xfs_inode_t *ip)
-{
-       return (cpsema(&(ip->i_flock)));
-}
-
-void
-xfs_ifunlock(xfs_inode_t *ip)
-{
-       ASSERT(issemalocked(&(ip->i_flock)));
-       vsema(&(ip->i_flock));
-}