Alan Cox wrote:
> 
> > +
> > +       /* 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)

Speaking as an old time dos hacker, this is allowed and commonly done. 
I wouldn't read too much into the fact that it's not documented.  :-) 
As I recall, new clusters are allocated but not cleared.

--
Daniel
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to