diff options
author | Joern Engel <joern@logfs.org> | 2011-08-05 11:13:30 +0200 |
---|---|---|
committer | Prasad Joshi <prasadjoshi.linux@gmail.com> | 2012-01-28 11:43:07 +0530 |
commit | bbe01387129f76fa4bec17904eb14c4bdc3c179f (patch) | |
tree | 7524e5c127da68f483221183ffb0ae841ebb1e6e /fs | |
parent | 1bcceaff8cbe5e5698ccf1015c9a938aa72718c4 (diff) | |
download | op-kernel-dev-bbe01387129f76fa4bec17904eb14c4bdc3c179f.zip op-kernel-dev-bbe01387129f76fa4bec17904eb14c4bdc3c179f.tar.gz |
logfs: Grow inode in delete path
Can be necessary if an inode gets deleted (through -ENOSPC) before being
written. Might be better to move this into logfs_write_rec(), but for
now go with the stupid&safe patch.
Signed-off-by: Joern Engel <joern@logfs.org>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/logfs/readwrite.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/logfs/readwrite.c b/fs/logfs/readwrite.c index 88284c6..4153e65 100644 --- a/fs/logfs/readwrite.c +++ b/fs/logfs/readwrite.c @@ -1576,11 +1576,15 @@ int logfs_write_buf(struct inode *inode, struct page *page, long flags) static int __logfs_delete(struct inode *inode, struct page *page) { long flags = WF_DELETE; + int err; inode->i_ctime = inode->i_mtime = CURRENT_TIME; if (page->index < I0_BLOCKS) return logfs_write_direct(inode, page, flags); + err = grow_inode(inode, page->index, 0); + if (err) + return err; return logfs_write_rec(inode, page, page->index, 0, flags); } |