Message ID | d50e22690bdea060f485ac1dc19a54fa4d6e4411.1526025007.git.osandov@fb.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, May 11, 2018 at 12:56:06AM -0700, Omar Sandoval wrote: > From: Omar Sandoval <osandov@fb.com> > > Commit a41ad394a03b ("Btrfs: convert to the new truncate sequence") > changed vmtruncate() to truncate_setsize() but didn't update the comment > above it. truncate_setsize() never fails (the IS_SWAPFILE() check > happens elsewhere), so remove the comment. There's one more mention of vmtruncate at btrfs_page_mkwrite, can you please remove it and review that the comment is not stale in other respects? Thanks. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, May 11, 2018 at 12:19:43PM +0200, David Sterba wrote: > On Fri, May 11, 2018 at 12:56:06AM -0700, Omar Sandoval wrote: > > From: Omar Sandoval <osandov@fb.com> > > > > Commit a41ad394a03b ("Btrfs: convert to the new truncate sequence") > > changed vmtruncate() to truncate_setsize() but didn't update the comment > > above it. truncate_setsize() never fails (the IS_SWAPFILE() check > > happens elsewhere), so remove the comment. > > There's one more mention of vmtruncate at btrfs_page_mkwrite, can you > please remove it and review that the comment is not stale in other > respects? Thanks. Yup, I'll take a look at that. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index d241285a0d2a..fef8dbb6a93f 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5106,7 +5106,6 @@ static int btrfs_setsize(struct inode *inode, struct iattr *attr) if (ret) return ret; - /* we don't support swapfiles, so vmtruncate shouldn't fail */ truncate_setsize(inode, newsize); /* Disable nonlocked read DIO to avoid the end less truncate */