This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / fs / ntfs / lcnalloc.c
index 23fd911..748ed0d 100644 (file)
@@ -30,7 +30,6 @@
 #include "volume.h"
 #include "attrib.h"
 #include "malloc.h"
-#include "aops.h"
 #include "ntfs.h"
 
 /**
@@ -47,7 +46,7 @@
  * Locking: - The volume lcn bitmap must be locked for writing on entry and is
  *           left locked on return.
  */
-int ntfs_cluster_free_from_rl_nolock(ntfs_volume *vol,
+static int ntfs_cluster_free_from_rl_nolock(ntfs_volume *vol,
                const runlist_element *rl)
 {
        struct inode *lcnbmp_vi = vol->lcnbmp_ino;
@@ -856,7 +855,7 @@ s64 __ntfs_cluster_free(struct inode *vi, const VCN start_vcn, s64 count,
                err = PTR_ERR(rl);
                goto err_out;
        }
-       if (unlikely(rl->lcn < LCN_HOLE)) {
+       if (unlikely(rl->lcn < (LCN)LCN_HOLE)) {
                if (!is_rollback)
                        ntfs_error(vol->sb, "First runlist element has "
                                        "invalid lcn, aborting.");
@@ -896,15 +895,15 @@ s64 __ntfs_cluster_free(struct inode *vi, const VCN start_vcn, s64 count,
         * free them.
         */
        for (; rl->length && count != 0; ++rl) {
-               if (unlikely(rl->lcn < LCN_HOLE)) {
+               if (unlikely(rl->lcn < (LCN)LCN_HOLE)) {
                        VCN vcn;
 
                        /*
                         * Attempt to map runlist, dropping runlist lock for
                         * the duration.
                         */
-                       vcn = rl->vcn;
                        up_read(&ni->runlist.lock);
+                       vcn = rl->vcn;
                        err = ntfs_map_runlist(ni, vcn);
                        if (err) {
                                if (!is_rollback)
@@ -927,7 +926,7 @@ s64 __ntfs_cluster_free(struct inode *vi, const VCN start_vcn, s64 count,
                                                        "element.");
                                goto err_out;
                        }
-                       if (unlikely(rl->lcn < LCN_HOLE)) {
+                       if (unlikely(rl->lcn < (LCN)LCN_HOLE)) {
                                if (!is_rollback)
                                        ntfs_error(vol->sb, "Runlist element "
                                                        "has invalid lcn "