diff options
| author | Jan Engelmohr <jan.engelmohr@mailbox.tu-dresden.de> | 2016-07-26 15:25:59 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 15:52:24 +0200 |
| commit | 516480c70a5392533c2e3a81863ac02206a66e1b (patch) | |
| tree | c22efa9678c72859bd4f47c40d40e57139fa8131 /fs/stat.c | |
| parent | 08b83025dbff0cf59c6de550262999b3959067b2 (diff) | |
3.10.66 -> 3.10.67
Diffstat (limited to 'fs/stat.c')
| -rw-r--r-- | fs/stat.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -447,9 +447,8 @@ void inode_add_bytes(struct inode *inode, loff_t bytes) EXPORT_SYMBOL(inode_add_bytes); -void inode_sub_bytes(struct inode *inode, loff_t bytes) +void __inode_sub_bytes(struct inode *inode, loff_t bytes) { - spin_lock(&inode->i_lock); inode->i_blocks -= bytes >> 9; bytes &= 511; if (inode->i_bytes < bytes) { @@ -457,6 +456,14 @@ void inode_sub_bytes(struct inode *inode, loff_t bytes) inode->i_bytes += 512; } inode->i_bytes -= bytes; +} + +EXPORT_SYMBOL(__inode_sub_bytes); + +void inode_sub_bytes(struct inode *inode, loff_t bytes) +{ + spin_lock(&inode->i_lock); + __inode_sub_bytes(inode, bytes); spin_unlock(&inode->i_lock); } |
