Repository navigation
Commit 1b94746
cifs: truncate fallout
Remove the calls to inode_newsize_ok given that we already did it as
part of inode_change_ok in the beginning of cifs_setattr_(no)unix.
No need to call ->truncate if cifs doesn't have one, so remove the
explicit call in cifs_vmtruncate, and replace the calls to vmtruncate
with truncate_setsize which is vmtruncate minus inode_newsize_ok
and the call to ->truncate.
Rename cifs_vmtruncate to cifs_setsize to match the new calling conventions.
Question 1: why does cifs do the pagecache munging and i_size update twice
for each setattr call, once opencoded in cifs_vmtruncate, and once
using the VFS helpers?
Question 2: what is supposed to be protected by i_lock in cifs_vmtruncate?
Do we need it around the call to inode_change_ok?
[AV: fixed build breakage]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>1 parent e566d48 commit 1b94746
1 file changed
Lines changed: 7 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1679 | 1679 | | |
1680 | 1680 | | |
1681 | 1681 | | |
1682 | | - | |
| 1682 | + | |
1683 | 1683 | | |
1684 | 1684 | | |
1685 | | - | |
1686 | 1685 | | |
1687 | 1686 | | |
1688 | | - | |
1689 | | - | |
1690 | | - | |
1691 | | - | |
1692 | | - | |
1693 | | - | |
1694 | 1687 | | |
1695 | 1688 | | |
1696 | 1689 | | |
| 1690 | + | |
1697 | 1691 | | |
1698 | | - | |
1699 | | - | |
1700 | | - | |
1701 | | - | |
1702 | 1692 | | |
1703 | 1693 | | |
1704 | 1694 | | |
| |||
1771 | 1761 | | |
1772 | 1762 | | |
1773 | 1763 | | |
1774 | | - | |
| 1764 | + | |
1775 | 1765 | | |
1776 | 1766 | | |
1777 | 1767 | | |
| |||
1891 | 1881 | | |
1892 | 1882 | | |
1893 | 1883 | | |
1894 | | - | |
1895 | | - | |
1896 | | - | |
1897 | | - | |
1898 | | - | |
| 1884 | + | |
| 1885 | + | |
1899 | 1886 | | |
1900 | 1887 | | |
1901 | 1888 | | |
| |||
2050 | 2037 | | |
2051 | 2038 | | |
2052 | 2039 | | |
2053 | | - | |
2054 | | - | |
2055 | | - | |
2056 | | - | |
2057 | | - | |
| 2040 | + | |
| 2041 | + | |
2058 | 2042 | | |
2059 | 2043 | | |
2060 | 2044 | | |
| |||
0 commit comments