Re: [patch 01/11] fs: new truncate helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 26, 2009 at 10:38:11AM +0300, Artem Bityutskiy wrote:
> Hi,
> 
> On 08/20/2009 07:35 PM, npiggin@xxxxxxx wrote:
> >+/**
> >+ * inode_newsize_ok - may this inode be truncated to a given size
> >+ * @inode:	the inode to be truncated
> >+ * @offset:	the new size to assign to the inode
> >+ * @Returns:	0 on success, -ve errno on failure
> >+ *
> >+ * inode_newsize_ok will check filesystem limits and ulimits to check 
> >that the
> >+ * new inode size is within limits. inode_newsize_ok will also send 
> >SIGXFSZ
> >+ * when necessary. Caller must not proceed with inode size change if 
> >failure is
> >+ * returned. @inode must be a file (not directory), with appropriate
> >+ * permissions to allow truncate (inode_newsize_ok does NOT check these
> >+ * conditions).
> >+ *
> >+ * inode_newsize_ok must be called with i_mutex held.
> >+ */
> >+int inode_newsize_ok(struct inode *inode, loff_t offset)
> >+{
> 
> Could you use 'const' for inode here?

Sorry, I don't think I replied to you. Thanks for the suggestions, yes
const wouldn't hurt I guess. I will be sending a couple of incremental
updates to Andrew shortly so I'll include that.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux