Messages in this thread Patch in this message | | | From | Dmitry Monakhov <> | Subject | [PATCH 3/7] vfs: do not allow inode_setattr() to fail after vfs_dq_transfer() | Date | Fri, 19 Feb 2010 22:47:21 +0300 |
| |
After quota was transfered, inode_setattr() may fail. This is tricky situation because it may be impossible to roll-back quota changes. But we have already done all necessery changes in inode_change_ok() so it is safe to use nofail version of inode_seattr() here.
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> --- fs/attr.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/fs/attr.c b/fs/attr.c index cc2a801..c1ae61c 100644 --- a/fs/attr.c +++ b/fs/attr.c @@ -243,7 +243,11 @@ int notify_change(struct dentry * dentry, struct iattr * attr) error = vfs_dq_transfer(inode, attr) ? -EDQUOT : 0; if (!error) - error = inode_setattr(inode, attr); + /* + * All necessery check already done, it is + * safe to use nofail version here. + */ + __inode_setattr(inode, attr); } } -- 1.6.6
| |