[RFC 22/32] fs: convert simple fs to inode_time

From: Arnd Bergmann
Date: Fri May 30 2014 - 16:40:19 EST


tty, usbgadgetfs, configfs and cramfs do not store inode timestamps
permanently, but they use code that interacts with the VFS inode
times. In order to change over VFS to a struct inode_time, we
have to make trivial changes to these file systems as well.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Joel Becker <jlbec@xxxxxxxxxxxx>
---
drivers/tty/tty_io.c | 2 +-
drivers/usb/gadget/f_fs.c | 2 +-
fs/configfs/inode.c | 6 +++---
fs/cramfs/inode.c | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 3411071..c2c63e5 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -994,7 +994,7 @@ void start_tty(struct tty_struct *tty)
EXPORT_SYMBOL(start_tty);

/* We limit tty time update visibility to every 8 seconds or so. */
-static void tty_update_time(struct timespec *time)
+static void tty_update_time(struct inode_time *time)
{
unsigned long sec = get_seconds() & ~7;
if ((long)(sec - time->tv_sec) > 0)
diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/f_fs.c
index 74202d6..3947655 100644
--- a/drivers/usb/gadget/f_fs.c
+++ b/drivers/usb/gadget/f_fs.c
@@ -1069,7 +1069,7 @@ ffs_sb_make_inode(struct super_block *sb, void *data,
inode = new_inode(sb);

if (likely(inode)) {
- struct timespec current_time = CURRENT_TIME;
+ struct inode_time current_time = CURRENT_TIME;

inode->i_ino = get_next_ino();
inode->i_mode = perms->mode;
diff --git a/fs/configfs/inode.c b/fs/configfs/inode.c
index 5946ad9..62f10c0 100644
--- a/fs/configfs/inode.c
+++ b/fs/configfs/inode.c
@@ -95,13 +95,13 @@ int configfs_setattr(struct dentry * dentry, struct iattr * iattr)
if (ia_valid & ATTR_GID)
sd_iattr->ia_gid = iattr->ia_gid;
if (ia_valid & ATTR_ATIME)
- sd_iattr->ia_atime = timespec_trunc(iattr->ia_atime,
+ sd_iattr->ia_atime = inode_time_trunc(iattr->ia_atime,
inode->i_sb->s_time_gran);
if (ia_valid & ATTR_MTIME)
- sd_iattr->ia_mtime = timespec_trunc(iattr->ia_mtime,
+ sd_iattr->ia_mtime = inode_time_trunc(iattr->ia_mtime,
inode->i_sb->s_time_gran);
if (ia_valid & ATTR_CTIME)
- sd_iattr->ia_ctime = timespec_trunc(iattr->ia_ctime,
+ sd_iattr->ia_ctime = inode_time_trunc(iattr->ia_ctime,
inode->i_sb->s_time_gran);
if (ia_valid & ATTR_MODE) {
umode_t mode = iattr->ia_mode;
diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c
index ddcfe59..1b9ed3b 100644
--- a/fs/cramfs/inode.c
+++ b/fs/cramfs/inode.c
@@ -79,7 +79,7 @@ static struct inode *get_cramfs_inode(struct super_block *sb,
const struct cramfs_inode *cramfs_inode, unsigned int offset)
{
struct inode *inode;
- static struct timespec zerotime;
+ static struct inode_time zerotime;

inode = iget_locked(sb, cramino(cramfs_inode, offset));
if (!inode)
--
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/