mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] minor fixup of quota checking
@ 2001-07-11 21:22 Andreas Dilger
  0 siblings, 0 replies; only message in thread
From: Andreas Dilger @ 2001-07-11 21:22 UTC (permalink / raw)
  To: torvalds, Alan Cox, mvw; +Cc: Linux kernel development list

The following patch fixes (I think) an error in the boolean logic for
checking if a filesystem can support quotas.  Since quotas use both
read and write file operations, we need both functions available, but
the current test only fails if both read and write are NOT available.

Cheers, Andreas
==========================================================================
diff -ru linux-2.4.6.orig/fs/dquot.c linux-2.4.6-aed/fs/dquot.c
--- linux-2.4.6.orig/fs/dquot.c	Thu Jun 28 14:28:23 2001
+++ linux-2.4.6-aed/fs/dquot.c	Thu Jun 28 14:27:23 2001
@@ -1467,7 +1467,7 @@
 	if (IS_ERR(f))
 		goto out_lock;
 	error = -EIO;
-	if (!f->f_op || (!f->f_op->read && !f->f_op->write))
+	if (!f->f_op || !f->f_op->read || !f->f_op->write)
 		goto out_f;
 	inode = f->f_dentry->d_inode;
 	error = -EACCES;
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-07-11 21:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-07-11 21:22 [PATCH] minor fixup of quota checking Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®