From: Dmitry Monakhov <rjevskiy@gmail.com>
To: linux-ext4@vger.kernel.org
Cc: Dmitry Monakhov <dmonakhov@openvz.org>, linux-fsdevel@vger.kernel.org
Subject: Please ignore all my previous messges
Date: Sun, 13 Dec 2009 11:25:43 +0300 [thread overview]
Message-ID: <c18d6aa20912130025w775d8dfvcbdd19507c30ce5f@mail.gmail.com> (raw)
Hello. I'm really sorry. My default smtp server was dead, so i've used
alternative.
This result in unexpected problems with mail delivery :(
Please ignore my spam. Again sorry.
2009/12/12 Dmitry Monakhov <dmonakhov@openvz.org>:
> Quota code requires unlocked version of this function. Off course
> we can just copy-paste the code, but copy-pasting is always an evil.
>
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
> ---
> fs/stat.c | 10 ++++++++--
> include/linux/fs.h | 1 +
> 2 files changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/fs/stat.c b/fs/stat.c
> index 075694e..c4ecd52 100644
> --- a/fs/stat.c
> +++ b/fs/stat.c
> @@ -401,9 +401,9 @@ SYSCALL_DEFINE4(fstatat64, int, dfd, char __user *, filename,
> }
> #endif /* __ARCH_WANT_STAT64 */
>
> -void inode_add_bytes(struct inode *inode, loff_t bytes)
> +/* Caller is here responsible for sufficient locking (ie. inode->i_lock) */
> +void __inode_add_bytes(struct inode *inode, loff_t bytes)
> {
> - spin_lock(&inode->i_lock);
> inode->i_blocks += bytes >> 9;
> bytes &= 511;
> inode->i_bytes += bytes;
> @@ -411,6 +411,12 @@ void inode_add_bytes(struct inode *inode, loff_t bytes)
> inode->i_blocks++;
> inode->i_bytes -= 512;
> }
> +}
> +
> +void inode_add_bytes(struct inode *inode, loff_t bytes)
> +{
> + spin_lock(&inode->i_lock);
> + __inode_add_bytes(inode, bytes);
> spin_unlock(&inode->i_lock);
> }
>
> diff --git a/include/linux/fs.h b/include/linux/fs.h
> index 2620a8c..98ea200 100644
> --- a/include/linux/fs.h
> +++ b/include/linux/fs.h
> @@ -2314,6 +2314,7 @@ extern const struct inode_operations page_symlink_inode_operations;
> extern int generic_readlink(struct dentry *, char __user *, int);
> extern void generic_fillattr(struct inode *, struct kstat *);
> extern int vfs_getattr(struct vfsmount *, struct dentry *, struct kstat *);
> +void __inode_add_bytes(struct inode *inode, loff_t bytes);
> void inode_add_bytes(struct inode *inode, loff_t bytes);
> void inode_sub_bytes(struct inode *inode, loff_t bytes);
> loff_t inode_get_bytes(struct inode *inode);
> --
> 1.6.0.4
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
reply other threads:[~2009-12-13 8:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c18d6aa20912130025w775d8dfvcbdd19507c30ce5f@mail.gmail.com \
--to=rjevskiy@gmail.com \
--cc=dmonakhov@openvz.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).