Re: [PATCH RFC 1/5] UBIFS: xattr: protect ui_size and data_len by ui_mutex
On 02/14/2013 08:23 AM, Artem Bityutskiy wrote: > On Wed, 2013-02-13 at 11:23 +0100, Marc Kleine-Budde wrote: >> This patch moves the modification of ui->ui_size and ui->data_len in the >> create_xattr() and change_xattr() functions, so that they are protected by >> the >> ui_mutex as stated in the documenation of the the struct ubifs_inode. >> >> Signed-off-by: Marc Kleine-Budde > > I guess this one and 2/5 should have 'Cc: sta...@vger.kernel.org', > right? Will do. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature
Re: [PATCH RFC 1/5] UBIFS: xattr: protect ui_size and data_len by ui_mutex
On 02/14/2013 08:23 AM, Artem Bityutskiy wrote: On Wed, 2013-02-13 at 11:23 +0100, Marc Kleine-Budde wrote: This patch moves the modification of ui-ui_size and ui-data_len in the create_xattr() and change_xattr() functions, so that they are protected by the ui_mutex as stated in the documenation of the the struct ubifs_inode. Signed-off-by: Marc Kleine-Budde m...@pengutronix.de I guess this one and 2/5 should have 'Cc: sta...@vger.kernel.org', right? Will do. Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions| Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917- | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de | signature.asc Description: OpenPGP digital signature
Re: [PATCH RFC 1/5] UBIFS: xattr: protect ui_size and data_len by ui_mutex
On Wed, 2013-02-13 at 11:23 +0100, Marc Kleine-Budde wrote: > This patch moves the modification of ui->ui_size and ui->data_len in the > create_xattr() and change_xattr() functions, so that they are protected by the > ui_mutex as stated in the documenation of the the struct ubifs_inode. > > Signed-off-by: Marc Kleine-Budde I guess this one and 2/5 should have 'Cc: sta...@vger.kernel.org', right? -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC 1/5] UBIFS: xattr: protect ui_size and data_len by ui_mutex
This patch moves the modification of ui->ui_size and ui->data_len in the create_xattr() and change_xattr() functions, so that they are protected by the ui_mutex as stated in the documenation of the the struct ubifs_inode. Signed-off-by: Marc Kleine-Budde --- fs/ubifs/xattr.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c index 0f7139b..1395307 100644 --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c @@ -143,10 +143,10 @@ static int create_xattr(struct ubifs_info *c, struct inode *host, err = -ENOMEM; goto out_free; } - inode->i_size = ui->ui_size = size; - ui->data_len = size; mutex_lock(_ui->ui_mutex); + inode->i_size = ui->ui_size = size; + ui->data_len = size; host->i_ctime = ubifs_current_time(host); host_ui->xattr_cnt += 1; host_ui->xattr_size += CALC_DENT_SIZE(nm->len); @@ -208,10 +208,10 @@ static int change_xattr(struct ubifs_info *c, struct inode *host, err = -ENOMEM; goto out_free; } - inode->i_size = ui->ui_size = size; - ui->data_len = size; mutex_lock(_ui->ui_mutex); + inode->i_size = ui->ui_size = size; + ui->data_len = size; host->i_ctime = ubifs_current_time(host); host_ui->xattr_size -= CALC_XATTR_BYTES(ui->data_len); host_ui->xattr_size += CALC_XATTR_BYTES(size); -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[PATCH RFC 1/5] UBIFS: xattr: protect ui_size and data_len by ui_mutex
This patch moves the modification of ui-ui_size and ui-data_len in the create_xattr() and change_xattr() functions, so that they are protected by the ui_mutex as stated in the documenation of the the struct ubifs_inode. Signed-off-by: Marc Kleine-Budde m...@pengutronix.de --- fs/ubifs/xattr.c |8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c index 0f7139b..1395307 100644 --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c @@ -143,10 +143,10 @@ static int create_xattr(struct ubifs_info *c, struct inode *host, err = -ENOMEM; goto out_free; } - inode-i_size = ui-ui_size = size; - ui-data_len = size; mutex_lock(host_ui-ui_mutex); + inode-i_size = ui-ui_size = size; + ui-data_len = size; host-i_ctime = ubifs_current_time(host); host_ui-xattr_cnt += 1; host_ui-xattr_size += CALC_DENT_SIZE(nm-len); @@ -208,10 +208,10 @@ static int change_xattr(struct ubifs_info *c, struct inode *host, err = -ENOMEM; goto out_free; } - inode-i_size = ui-ui_size = size; - ui-data_len = size; mutex_lock(host_ui-ui_mutex); + inode-i_size = ui-ui_size = size; + ui-data_len = size; host-i_ctime = ubifs_current_time(host); host_ui-xattr_size -= CALC_XATTR_BYTES(ui-data_len); host_ui-xattr_size += CALC_XATTR_BYTES(size); -- 1.7.10.4 -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH RFC 1/5] UBIFS: xattr: protect ui_size and data_len by ui_mutex
On Wed, 2013-02-13 at 11:23 +0100, Marc Kleine-Budde wrote: This patch moves the modification of ui-ui_size and ui-data_len in the create_xattr() and change_xattr() functions, so that they are protected by the ui_mutex as stated in the documenation of the the struct ubifs_inode. Signed-off-by: Marc Kleine-Budde m...@pengutronix.de I guess this one and 2/5 should have 'Cc: sta...@vger.kernel.org', right? -- Best Regards, Artem Bityutskiy -- To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/