UPSTREAM: net: ethernet: arc: Probe emac after set RMII clock
[firefly-linux-kernel-4.4.55.git] / fs / ubifs / dir.c
index 1dd9267c165bade5e2e0d7de25ff95d4cb99586e..e49bd2808bf3e397b9b499fe4d6036ad7600a71b 100644 (file)
@@ -449,13 +449,14 @@ static int ubifs_readdir(struct file *file, struct dir_context *ctx)
        }
 
 out:
+       kfree(file->private_data);
+       file->private_data = NULL;
+
        if (err != -ENOENT) {
                ubifs_err(c, "cannot find next direntry, error %d", err);
                return err;
        }
 
-       kfree(file->private_data);
-       file->private_data = NULL;
        /* 2 is a special value indicating that there are no more direntries */
        ctx->pos = 2;
        return 0;
@@ -1185,6 +1186,9 @@ const struct inode_operations ubifs_dir_inode_operations = {
        .getxattr    = ubifs_getxattr,
        .listxattr   = ubifs_listxattr,
        .removexattr = ubifs_removexattr,
+#ifdef CONFIG_UBIFS_ATIME_SUPPORT
+       .update_time = ubifs_update_time,
+#endif
 };
 
 const struct file_operations ubifs_dir_operations = {