summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2017-08-08 09:54:36 +0200
committerJan Kara <jack@suse.cz>2017-08-17 22:06:03 +0200
commitf4a8116a4c8c8f754d0ec1498a2ba4b63d114e6a (patch)
treed3065b20975952041d211e6d0f221db6542cde19 /fs
parent3ab167d2ba10017a430e427ddd3d690a74f8692e (diff)
downloadlinux-f4a8116a4c8c8f754d0ec1498a2ba4b63d114e6a.tar.gz
linux-f4a8116a4c8c8f754d0ec1498a2ba4b63d114e6a.tar.bz2
linux-f4a8116a4c8c8f754d0ec1498a2ba4b63d114e6a.zip
fs: Provide __inode_get_bytes()
Provide helper __inode_get_bytes() which assumes i_lock is already acquired. Quota code will need this to be able to use i_lock to protect consistency of quota accounting information and inode usage. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/stat.c b/fs/stat.c
index c35610845ab1..8a6aa8caf891 100644
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -710,7 +710,7 @@ loff_t inode_get_bytes(struct inode *inode)
loff_t ret;
spin_lock(&inode->i_lock);
- ret = (((loff_t)inode->i_blocks) << 9) + inode->i_bytes;
+ ret = __inode_get_bytes(inode);
spin_unlock(&inode->i_lock);
return ret;
}