IGNORE word93 Validation BITS
CONFIG_IDEDMA_IVB
- Since various rules were applied and created ... et al. as it
- relates the detection of valid cable signals. This is a result of
- unclear terms in ATA-4 and ATA-5 standards.
+ There are unclear terms is ATA-4 and ATA-5 standards how certain
+ hardware (an 80c ribbon) should be detected. Different interpretations
+ of the standards have been released in hardware. This causes problems:
+ for example, a host with Ultra Mode 4 (or higher) will not run
+ in that mode with an 80c ribbon.
+
+ If you are experiencing compatibility or performance problems, you
+ MAY try to answering Y here. However, it does not necessarily solve
+ any of your problems, it could even cause more of them.
It is normally safe to answer Y; however, the default is N.
static inline void remove_free_dquot(struct dquot *dquot)
{
- /* sanity check */
- if (list_empty(&dquot->dq_free)) {
- printk("remove_free_dquot: dquot not on the free list??\n");
- return; /* J.K. Just don't do anything */
- }
+ if (list_empty(&dquot->dq_free))
+ return;
list_del(&dquot->dq_free);
INIT_LIST_HEAD(&dquot->dq_free);
nr_free_dquots--;
unlock_dquot(dquot);
}
-/*
- * Unhash and selectively clear the dquot structure,
- * but preserve the use count, list pointers, and
- * wait queue.
- */
-void clear_dquot(struct dquot *dquot)
-{
- /* unhash it first */
- remove_dquot_hash(dquot);
- dquot->dq_sb = NULL;
- dquot->dq_id = 0;
- dquot->dq_dev = NODEV;
- dquot->dq_type = -1;
- dquot->dq_flags = 0;
- dquot->dq_referenced = 0;
- memset(&dquot->dq_dqb, 0, sizeof(struct dqblk));
-}
-
/* Invalidate all dquots on the list, wait for all users. Note that this function is called
* after quota is disabled so no new quota might be created. As we only insert to the end of
* inuse list, we don't have to restart searching... */
continue;
if (dquot->dq_type != type)
continue;
+ dquot->dq_flags |= DQ_INVAL;
if (dquot->dq_count)
/*
* Wait for any users of quota. As we have already cleared the flags in
struct list_head *head;
struct dquot *dquot;
+ lock_kernel();
restart:
for (head = inuse_list.next; head != &inuse_list; head = head->next) {
dquot = list_entry(head, struct dquot, dq_inuse);
goto restart;
}
dqstats.syncs++;
+ unlock_kernel();
return 0;
}
int shrink_dqcache_memory(int priority, unsigned int gfp_mask)
{
+ lock_kernel();
prune_dqcache(nr_free_dquots / (priority + 1));
+ unlock_kernel();
kmem_cache_shrink(dquot_cachep);
return 0;
}
return;
}
dquot->dq_count--;
- /* Place at end of LRU free queue */
- put_dquot_last(dquot);
+ /* If dquot is going to be invalidated invalidate_dquots() is going to free it so */
+ if (!(dquot->dq_flags & DQ_INVAL))
+ put_dquot_last(dquot); /* Place at end of LRU free queue */
wake_up(&dquot->dq_wait_free);
}
-struct dquot *get_empty_dquot(void)
+static struct dquot *get_empty_dquot(void)
{
struct dquot *dquot;
/* Free list of dquots - called from inode.c */
void put_dquot_list(struct list_head *tofree_head)
{
- struct list_head *act_head = tofree_head->next;
+ struct list_head *act_head;
struct dquot *dquot;
+ lock_kernel();
+ act_head = tofree_head->next;
/* So now we have dquots on the list... Just free them */
while (act_head != tofree_head) {
dquot = list_entry(act_head, struct dquot, dq_free);
INIT_LIST_HEAD(&dquot->dq_free);
dqput(dquot);
}
+ unlock_kernel();
}
static inline void dquot_incr_inodes(struct dquot *dquot, unsigned long number)
short cnt;
struct quota_mount_options *dqopt = sb_dqopt(sb);
+ lock_kernel();
if (!sb)
goto out;
}
up(&dqopt->dqoff_sem);
out:
+ unlock_kernel();
return 0;
}
if (!sb->dq_op)
return; /* nothing to do */
-
/* We have to be protected against other CPUs */
- spin_lock(&inode_lock);
+ lock_kernel(); /* This lock is for quota code */
+ spin_lock(&inode_lock); /* This lock is for inodes code */
list_for_each(act_head, &inode_in_use) {
inode = list_entry(act_head, struct inode, i_list);
remove_inode_dquot_ref(inode, type, &tofree_head);
}
spin_unlock(&inode_lock);
+ unlock_kernel();
put_dquot_list(&tofree_head);
}