diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-10 20:16:43 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-10 20:16:43 -0700 |
commit | 101105b1717f536ca741f940033996302d4ef191 (patch) | |
tree | 12ab41ae1b1b66105e9fa2ea763356d2be7e8b34 /drivers | |
parent | 35ff96dfd3c9aaa921b3e8dcac76b7697f2dcec0 (diff) | |
parent | 3873691e5ab34fa26948643d038a2b98c4437298 (diff) |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/sonypi.c | 2 | ||||
-rw-r--r-- | drivers/infiniband/hw/qib/qib_fs.c | 2 | ||||
-rw-r--r-- | drivers/misc/ibmasm/ibmasmfs.c | 2 | ||||
-rw-r--r-- | drivers/oprofile/oprofilefs.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/namei.c | 8 | ||||
-rw-r--r-- | drivers/usb/core/devio.c | 18 | ||||
-rw-r--r-- | drivers/usb/gadget/function/f_fs.c | 8 | ||||
-rw-r--r-- | drivers/usb/gadget/legacy/inode.c | 2 |
9 files changed, 25 insertions, 21 deletions
diff --git a/drivers/char/sonypi.c b/drivers/char/sonypi.c index e496daefe9e0..719c5b4eed39 100644 --- a/drivers/char/sonypi.c +++ b/drivers/char/sonypi.c @@ -934,7 +934,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf, if (ret > 0) { struct inode *inode = file_inode(file); - inode->i_atime = current_fs_time(inode->i_sb); + inode->i_atime = current_time(inode); } return ret; diff --git a/drivers/infiniband/hw/qib/qib_fs.c b/drivers/infiniband/hw/qib/qib_fs.c index c3edc033f7c4..f1e66efea98a 100644 --- a/drivers/infiniband/hw/qib/qib_fs.c +++ b/drivers/infiniband/hw/qib/qib_fs.c @@ -64,7 +64,7 @@ static int qibfs_mknod(struct inode *dir, struct dentry *dentry, inode->i_uid = GLOBAL_ROOT_UID; inode->i_gid = GLOBAL_ROOT_GID; inode->i_blocks = 0; - inode->i_atime = CURRENT_TIME; + inode->i_atime = current_time(inode); inode->i_mtime = inode->i_atime; inode->i_ctime = inode->i_atime; inode->i_private = data; diff --git a/drivers/misc/ibmasm/ibmasmfs.c b/drivers/misc/ibmasm/ibmasmfs.c index 9c677f3f3c26..520f58439080 100644 --- a/drivers/misc/ibmasm/ibmasmfs.c +++ b/drivers/misc/ibmasm/ibmasmfs.c @@ -144,7 +144,7 @@ static struct inode *ibmasmfs_make_inode(struct super_block *sb, int mode) if (ret) { ret->i_ino = get_next_ino(); ret->i_mode = mode; - ret->i_atime = ret->i_mtime = ret->i_ctime = CURRENT_TIME; + ret->i_atime = ret->i_mtime = ret->i_ctime = current_time(ret); } return ret; } diff --git a/drivers/oprofile/oprofilefs.c b/drivers/oprofile/oprofilefs.c index a0e5260bd006..134398e0231b 100644 --- a/drivers/oprofile/oprofilefs.c +++ b/drivers/oprofile/oprofilefs.c @@ -30,7 +30,7 @@ static struct inode *oprofilefs_get_inode(struct super_block *sb, int mode) if (inode) { inode->i_ino = get_next_ino(); inode->i_mode = mode; - inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; + inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode); } return inode; } diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 1dba3598cfcb..c890a49587e4 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -4116,7 +4116,7 @@ static ssize_t sonypi_misc_read(struct file *file, char __user *buf, if (ret > 0) { struct inode *inode = file_inode(file); - inode->i_atime = current_fs_time(inode->i_sb); + inode->i_atime = current_time(inode); } return ret; diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index ff3ce7486b29..180f35e3afd9 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -1097,13 +1097,17 @@ out: } static int ll_rename(struct inode *src, struct dentry *src_dchild, - struct inode *tgt, struct dentry *tgt_dchild) + struct inode *tgt, struct dentry *tgt_dchild, + unsigned int flags) { struct ptlrpc_request *request = NULL; struct ll_sb_info *sbi = ll_i2sbi(src); struct md_op_data *op_data; int err; + if (flags) + return -EINVAL; + CDEBUG(D_VFSTRACE, "VFS Op:oldname=%pd, src_dir="DFID"(%p), newname=%pd, tgt_dir="DFID"(%p)\n", src_dchild, PFID(ll_inode2fid(src)), src, @@ -1148,7 +1152,7 @@ const struct inode_operations ll_dir_inode_operations = { .rmdir = ll_rmdir, .symlink = ll_symlink, .link = ll_link, - .rename = ll_rename, + .rename = ll_rename, .setattr = ll_setattr, .getattr = ll_getattr, .permission = ll_inode_permission, diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 09c8d9ca61ae..4016dae7433b 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -2409,21 +2409,21 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd, snoop(&dev->dev, "%s: CONTROL\n", __func__); ret = proc_control(ps, p); if (ret >= 0) - inode->i_mtime = CURRENT_TIME; + inode->i_mtime = current_time(inode); break; case USBDEVFS_BULK: snoop(&dev->dev, "%s: BULK\n", __func__); ret = proc_bulk(ps, p); if (ret >= 0) - inode->i_mtime = CURRENT_TIME; + inode->i_mtime = current_time(inode); break; case USBDEVFS_RESETEP: snoop(&dev->dev, "%s: RESETEP\n", __func__); ret = proc_resetep(ps, p); if (ret >= 0) - inode->i_mtime = CURRENT_TIME; + inode->i_mtime = current_time(inode); break; case USBDEVFS_RESET: @@ -2435,7 +2435,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd, snoop(&dev->dev, "%s: CLEAR_HALT\n", __func__); ret = proc_clearhalt(ps, p); if (ret >= 0) - inode->i_mtime = CURRENT_TIME; + inode->i_mtime = current_time(inode); break; case USBDEVFS_GETDRIVER: @@ -2462,7 +2462,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd, snoop(&dev->dev, "%s: SUBMITURB\n", __func__); ret = proc_submiturb(ps, p); if (ret >= 0) - inode->i_mtime = CURRENT_TIME; + inode->i_mtime = current_time(inode); break; #ifdef CONFIG_COMPAT @@ -2470,14 +2470,14 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd, snoop(&dev->dev, "%s: CONTROL32\n", __func__); ret = proc_control_compat(ps, p); if (ret >= 0) - inode->i_mtime = CURRENT_TIME; + inode->i_mtime = current_time(inode); break; case USBDEVFS_BULK32: snoop(&dev->dev, "%s: BULK32\n", __func__); ret = proc_bulk_compat(ps, p); if (ret >= 0) - inode->i_mtime = CURRENT_TIME; + inode->i_mtime = current_time(inode); break; case USBDEVFS_DISCSIGNAL32: @@ -2489,7 +2489,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd, snoop(&dev->dev, "%s: SUBMITURB32\n", __func__); ret = proc_submiturb_compat(ps, p); if (ret >= 0) - inode->i_mtime = CURRENT_TIME; + inode->i_mtime = current_time(inode); break; case USBDEVFS_IOCTL32: @@ -2552,7 +2552,7 @@ static long usbdev_do_ioctl(struct file *file, unsigned int cmd, done: usb_unlock_device(dev); if (ret >= 0) - inode->i_atime = CURRENT_TIME; + inode->i_atime = current_time(inode); return ret; } diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 0aeed85bb5cb..54ad100af35b 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c @@ -1196,15 +1196,15 @@ ffs_sb_make_inode(struct super_block *sb, void *data, inode = new_inode(sb); if (likely(inode)) { - struct timespec current_time = CURRENT_TIME; + struct timespec ts = current_time(inode); inode->i_ino = get_next_ino(); inode->i_mode = perms->mode; inode->i_uid = perms->uid; inode->i_gid = perms->gid; - inode->i_atime = current_time; - inode->i_mtime = current_time; - inode->i_ctime = current_time; + inode->i_atime = ts; + inode->i_mtime = ts; + inode->i_ctime = ts; inode->i_private = data; if (fops) inode->i_fop = fops; diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c index 16104b5ebdcb..bd82dd12deff 100644 --- a/drivers/usb/gadget/legacy/inode.c +++ b/drivers/usb/gadget/legacy/inode.c @@ -1913,7 +1913,7 @@ gadgetfs_make_inode (struct super_block *sb, inode->i_uid = make_kuid(&init_user_ns, default_uid); inode->i_gid = make_kgid(&init_user_ns, default_gid); inode->i_atime = inode->i_mtime = inode->i_ctime - = CURRENT_TIME; + = current_time(inode); inode->i_private = data; inode->i_fop = fops; } |