Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull more vfs updates from Al Viro: ">rename2() work from Miklos + current_time() from Deepa" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fs: Replace current_fs_time() with current_time() fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps fs: Replace CURRENT_TIME with current_time() for inode timestamps fs: proc: Delete inode time initializations in proc_alloc_inode() vfs: Add current_time() api vfs: add note about i_op->rename changes to porting fs: rename "rename2" i_op to "rename" vfs: remove unused i_op->rename fs: make remaining filesystems use .rename2 libfs: support RENAME_NOREPLACE in simple_rename() fs: support RENAME_NOREPLACE for local filesystems ncpfs: fix unused variable warning
Этот коммит содержится в:
@@ -109,7 +109,7 @@ static inline void coda_dir_update_mtime(struct inode *dir)
|
||||
/* optimistically we can also act as if our nose bleeds. The
|
||||
* granularity of the mtime is coarse anyways so we might actually be
|
||||
* right most of the time. Note: we only do this for directories. */
|
||||
dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
|
||||
dir->i_mtime = dir->i_ctime = current_time(dir);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -291,7 +291,8 @@ static int coda_rmdir(struct inode *dir, struct dentry *de)
|
||||
|
||||
/* rename */
|
||||
static int coda_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
struct inode *new_dir, struct dentry *new_dentry)
|
||||
struct inode *new_dir, struct dentry *new_dentry,
|
||||
unsigned int flags)
|
||||
{
|
||||
const char *old_name = old_dentry->d_name.name;
|
||||
const char *new_name = new_dentry->d_name.name;
|
||||
@@ -299,6 +300,9 @@ static int coda_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||
int new_length = new_dentry->d_name.len;
|
||||
int error;
|
||||
|
||||
if (flags)
|
||||
return -EINVAL;
|
||||
|
||||
error = venus_rename(old_dir->i_sb, coda_i2f(old_dir),
|
||||
coda_i2f(new_dir), old_length, new_length,
|
||||
(const char *) old_name, (const char *)new_name);
|
||||
|
@@ -54,7 +54,7 @@ coda_file_write_iter(struct kiocb *iocb, struct iov_iter *to)
|
||||
ret = vfs_iter_write(cfi->cfi_container, to, &iocb->ki_pos);
|
||||
coda_inode->i_size = file_inode(host_file)->i_size;
|
||||
coda_inode->i_blocks = (coda_inode->i_size + 511) >> 9;
|
||||
coda_inode->i_mtime = coda_inode->i_ctime = CURRENT_TIME_SEC;
|
||||
coda_inode->i_mtime = coda_inode->i_ctime = current_time(coda_inode);
|
||||
inode_unlock(coda_inode);
|
||||
file_end_write(host_file);
|
||||
return ret;
|
||||
|
@@ -271,7 +271,7 @@ int coda_setattr(struct dentry *de, struct iattr *iattr)
|
||||
|
||||
memset(&vattr, 0, sizeof(vattr));
|
||||
|
||||
inode->i_ctime = CURRENT_TIME_SEC;
|
||||
inode->i_ctime = current_time(inode);
|
||||
coda_iattr_to_vattr(iattr, &vattr);
|
||||
vattr.va_type = C_VNON; /* cannot set type */
|
||||
|
||||
|
Ссылка в новой задаче
Block a user