From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: djdave@bigpond.net.au (Dave)
Cc: linux-kernel@vger.kernel.org
Subject: Re: ftruncate returning EPERM on vfat filesystem
Date: Sun, 7 Jan 2001 13:55:15 +0000 (GMT) [thread overview]
Message-ID: <E14FGI2-0002fo-00@the-village.bc.nu> (raw)
In-Reply-To: <Pine.LNX.4.30.0101071613130.1132-100000@athlon.internal> from "Dave" at Jan 07, 2001 04:47:01 PM
> +
> + /* FAT cannot truncate to a longer file */
> + if (attr->ia_valid & ATTR_SIZE) {
> + if (attr->ia_size > inode->i_size)
> + return -EPERM;
> + }
>
> error = inode_change_ok(inode, attr);
> if (error)
>
> Can someone tell me if this is the cause of my samba problems, and if
> so, why this was added and if this is safe to revert?
To stop a case where the fs gets corrupted otherwise. You can change that to
return 0 which is more correct but most not remove it.
(ftruncate is specified to make the file at most length bytes long, extending
the file is not a guaranteed side effect according to the docs I have)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-07 13:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-07 6:47 Dave
2001-01-07 13:55 ` Alan Cox [this message]
2001-01-07 15:20 ` Dave
2001-01-07 16:44 ` Daniel Phillips
2001-01-07 21:03 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E14FGI2-0002fo-00@the-village.bc.nu \
--to=alan@lxorguk.ukuu.org.uk \
--cc=djdave@bigpond.net.au \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome