summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* convert nilfs2 to ->evict_inode()Al Viro2010-08-093-24/+26
| | | | | | [folded build fix from sfr] Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* convert exofs to ->evict_inode()Al Viro2010-08-093-6/+6
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* convert reiserfs to ->evict_inode()Al Viro2010-08-092-10/+11
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* convert btrfs to ->evict_inode()Al Viro2010-08-093-4/+8
| | | | | | | | | NB: do we want btrfs_wait_ordered_range() on eviction of inodes with positive i_nlink on subvolume with zero root_refs? If not, btrfs_evict_inode() can be simplified by unconditionally bailing out in case of i_nlink > 0 in the very beginning... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch gfs2 to ->evict_inode()Al Viro2010-08-091-24/+15
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* convert ocfs2 to ->evict_inode()Al Viro2010-08-093-11/+16
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch ncpfs to ->evict_inode()Al Viro2010-08-091-6/+6
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch udf to ->evict_inode()Al Viro2010-08-094-35/+21
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch ubifs to ->evict_inode()Al Viro2010-08-091-4/+8
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch jfs to ->evict_inode()Al Viro2010-08-093-25/+20
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch hpfs to ->evict_inode()Al Viro2010-08-093-7/+9
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch hppfs to ->evict_inode()Al Viro2010-08-091-4/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* try to get rid of races in hostfs open()Al Viro2010-08-093-12/+37
| | | | | | | | | | | | | | | | | | In case of mode mismatch, do *not* blindly close the descriptor another openers might be using right now. Open the underlying file with currently sufficient mode, then * if current mode has grown so that it's sufficient for us now, just close our new fd * if current mode has grown and our fd is *not* enough to cover it, close and repeat. * otherwise, install our fd if the file hadn't been opened at all or dup2() our fd over the current one (and close our fd). Critical section is protected by mutex; yes, system-wide. All we do under it is a bunch of comparison and maybe an overwriting dup2() on host. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* leak in hostfs_unlink()Al Viro2010-08-091-2/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* hostfs: fix races in dentry_name() and inode_name()Al Viro2010-08-091-46/+60
| | | | | | | | calculating size, then doing allocation, then filling the path is a Bad Idea(tm), since the ancestors can be renamed, leading to buffer overrun. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* new helper: __dentry_path()Al Viro2010-08-091-5/+22
| | | | | | | builds path relative to fs root, called under dcache_lock, doesn't append any nonsense to unlinked ones. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* hostfs: sanitize symlinksAl Viro2010-08-091-26/+35
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* hostfs: get rid of inode_dentry_name()Al Viro2010-08-091-35/+20
| | | | | | it's equivalent to dentry_name() anyway Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* hostfs: get rid of file_type(), fold init_inode()Al Viro2010-08-093-93/+45
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch stat_file() to passing a single struct rather than fsckloads of pointersAl Viro2010-08-093-68/+58
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* hostfs: pass pathname to init_inode()Al Viro2010-08-091-30/+15
| | | | | | | | | We will calculate it in all callers anyway, so there's no need to duplicate that inside. Moreover, that way we lose all failure exits in init_inode(), so it doesn't need to return anything. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* get rid of hostfs_read_inode()Al Viro2010-08-091-53/+16
| | | | | | | | | There are only two call sites; in one (hostfs_iget()) it's actually a no-op and in another (fill_super()) it's easier to expand the damn thing and use what we know about its arguments to simplify it. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* hostfs: don't keep a field in each inode when we are using it only in rootAl Viro2010-08-091-24/+15
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* stop icache pollution in hostfs, switch to ->evict_inode()Al Viro2010-08-091-22/+8
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch affs to ->evict_inode()Al Viro2010-08-093-17/+14
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch omfs to ->evict_inode()Al Viro2010-08-091-3/+6
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch bfs to ->evict_inode(), clean upAl Viro2010-08-091-38/+32
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* convert ext3 to ->evict_inode()Al Viro2010-08-093-35/+28
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch ufs to ->evict_inode()Al Viro2010-08-094-21/+28
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* covert fatfs to ->evict_inode()Al Viro2010-08-091-11/+9
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch smbfs to evict_inode()Al Viro2010-08-091-4/+4
| | | | | | NB: treatment of inode hash is completely braindead there Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch sysv to ->evict_inode()Al Viro2010-08-092-6/+10
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* merge ext2 delete_inode and clear_inode, switch to ->evict_inode()Al Viro2010-08-094-37/+36
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Don't dirty the victim in ext2_xattr_delete_inode()Al Viro2010-08-091-2/+0
| | | | | | | ... it's beyond fs-writeback reach already - writeback won't be started at that point. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Take dirtying the inode to callers of ext2_free_blocks()Al Viro2010-08-093-3/+7
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* ext2: switch to dquot_free_block_nodirty()Al Viro2010-08-092-8/+16
| | | | | | brute-force conversion Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch minix to ->evict_inode(), fix write_inode/delete_inode raceAl Viro2010-08-092-9/+12
| | | | | | | We need to wait for completion of possible writeback in progress before we clear on-disk inode during deletion. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch sysfs to ->evict_inode()Al Viro2010-08-093-5/+5
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch procfs to ->evict_inode()Al Viro2010-08-091-3/+3
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* simplify get_cramfs_inode()Al Viro2010-08-091-50/+38
| | | | | | | | simply don't hash the inodes that don't have real inumber instead of skipping them during iget5_locked(); as the result, simple iget_locked() would do and we can get rid of cramfs ->drop_inode() as well. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* new helper: end_writeback()Al Viro2010-08-092-1/+13
| | | | | | | | | | | Essentially, the minimal variant of ->evict_inode(). It's a trimmed-down clear_inode(), sans any fs callbacks. Once it returns we know that no async writeback will be happening; every ->evict_inode() instance should do that once and do that before doing anything ->write_inode() could interfere with (e.g. freeing the on-disk inode). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* Take ->i_bdev/->i_cdev handling out of clear_inode()Al Viro2010-08-091-4/+4
| | | | | | | | All call chains to clear_inode() pass through evict_inode() and clear_inode() should be called by evict_inode() exactly once. So we can pull i_bdev/i_cdev detaching up to evict_inode() itself. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* generic_detach_inode() can be static nowAl Viro2010-08-091-2/+1
| | | | Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* switch hugetlbfs to ->evict_inode()Al Viro2010-08-091-20/+2
| | | | | | The first spoils - hugetlb can use default ->drop_inode() now. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* New method - evict_inode()Al Viro2010-08-091-1/+3
| | | | | | | | Hybrid of ->clear_inode() and ->delete_inode(); if present, does all fs work to be done when in-core inode is about to be gone, for whatever reason. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* unify fs/inode.c callers of clear_inode()Al Viro2010-08-091-19/+17
| | | | | | For now, just a straightforward merge Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* simplify checks for I_CLEAR/I_FREEINGAl Viro2010-08-0910-26/+25
| | | | | | | | | | | | | | add I_CLEAR instead of replacing I_FREEING with it. I_CLEAR is equivalent to I_FREEING for almost all code looking at either; it's there to keep track of having called clear_inode() exactly once per inode lifetime, at some point after having set I_FREEING. I_CLEAR and I_FREEING never get set at the same time with the current code, so we can switch to setting i_flags to I_FREEING | I_CLEAR instead of I_CLEAR without loss of information. As the result of such change, checks become simpler and the amount of code that needs to know about I_CLEAR shrinks a lot. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* get rid of file_fsync()Al Viro2010-08-095-28/+53
| | | | | | Copy and simplify in the only two users remaining. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* xfs: new truncate sequenceChristoph Hellwig2010-08-094-42/+56
| | | | | | | | | | | | | | | | | | | | | | | Convert XFS to the new truncate sequence. We still can have errors after updating the file size in xfs_setattr, but these are real I/O errors and lead to a transaction abort and filesystem shutdown, so they are not an issue. Errors from ->write_begin and write_end can now be handled correctly because we can actually get rid of the delalloc extents while previous the buffer state was stipped in block_invalidatepage. There is still no error handling for ->direct_IO, because doing so will need some major restructuring given that we only have the iolock shared and do not hold i_mutex at all. Fortunately leaving the normally allocated blocks behind there is not a major issue and this will get cleaned up by xfs_free_eofblock later. Note: the patch is against Al's vfs.git tree as that contains the nessecary preparations. I'd prefer to get it applied there so that we can get some testing in linux-next. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
* exofs: New truncate sequenceBoaz Harrosh2010-08-093-75/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | These changes are crafted based on the similar conversion done to ext2 by Nick Piggin. * Remove the deprecated ->truncate vector. Let exofs_setattr take care of on-disk size updates. * Call truncate_pagecache on the unused pages if write_begin/end fails. * Cleanup exofs_delete_inode that did stupid inode writes and updates on an inode that will be removed. * And finally get rid of exofs_get_block. We never had any blocks it was all for calling nobh_truncate_page. nobh_truncate_page is not actually needed in exofs since the last page is complete and gone, just like all the other pages. There is no partial blocks in exofs. I've tested with this patch, and there are no apparent failures, so far. CC: Nick Piggin <npiggin@suse.de> CC: Christoph Hellwig <hch@lst.de> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
OpenPOWER on IntegriCloud