Messages in this thread Patch in this message | | | From | Dmitry Monakhov <> | Subject | [PATCH 7/7] ocfs2: use nofail variant of inode_setattr() | Date | Fri, 19 Feb 2010 22:47:25 +0300 |
| |
After we updated i_disk_size and stop the journal it is too late for error handling from inode_setattr(). Since inode_change_ok() is now responsible for all necessery checks we may call __inode_setattr() which can not fail.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> --- fs/ocfs2/file.c | 15 +-------------- 1 files changed, 1 insertions(+), 14 deletions(-)
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 06ccf6a..4aed46b 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -1065,20 +1065,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) goto bail_unlock; } } - - /* - * This will intentionally not wind up calling vmtruncate(), - * since all the work for a size change has been done above. - * Otherwise, we could get into problems with truncate as - * ip_alloc_sem is used there to protect against i_size - * changes. - */ - status = inode_setattr(inode, attr); - if (status < 0) { - mlog_errno(status); - goto bail_commit; - } - + __inode_setattr(inode, attr); status = ocfs2_mark_inode_dirty(handle, inode, bh); if (status < 0) mlog_errno(status); -- 1.6.6
| |