diff options
Diffstat (limited to 'fs/kernfs')
-rw-r--r-- | fs/kernfs/dir.c | 6 | ||||
-rw-r--r-- | fs/kernfs/inode.c | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/fs/kernfs/dir.c b/fs/kernfs/dir.c index 2b23ad91a464..dcd96aac02f5 100644 --- a/fs/kernfs/dir.c +++ b/fs/kernfs/dir.c @@ -1096,13 +1096,17 @@ static int kernfs_iop_rmdir(struct inode *dir, struct dentry *dentry) } static int kernfs_iop_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) { struct kernfs_node *kn = old_dentry->d_fsdata; struct kernfs_node *new_parent = new_dir->i_private; struct kernfs_syscall_ops *scops = kernfs_root(kn)->syscall_ops; int ret; + if (flags) + return -EINVAL; + if (!scops || !scops->rename) return -EPERM; diff --git a/fs/kernfs/inode.c b/fs/kernfs/inode.c index 102b6f0bc7af..a1982118f92f 100644 --- a/fs/kernfs/inode.c +++ b/fs/kernfs/inode.c @@ -168,7 +168,7 @@ static inline void set_default_inode_attr(struct inode *inode, umode_t mode) { inode->i_mode = mode; inode->i_atime = inode->i_mtime = - inode->i_ctime = current_fs_time(inode->i_sb); + inode->i_ctime = current_time(inode); } static inline void set_inode_attr(struct inode *inode, struct iattr *iattr) |