|
@@ -51,6 +51,7 @@
|
|
#include "xfs_vnodeops.h"
|
|
#include "xfs_vnodeops.h"
|
|
|
|
|
|
#include <linux/capability.h>
|
|
#include <linux/capability.h>
|
|
|
|
+#include <linux/mount.h>
|
|
#include <linux/writeback.h>
|
|
#include <linux/writeback.h>
|
|
|
|
|
|
|
|
|
|
@@ -670,10 +671,16 @@ start:
|
|
if (new_size > xip->i_size)
|
|
if (new_size > xip->i_size)
|
|
xip->i_new_size = new_size;
|
|
xip->i_new_size = new_size;
|
|
|
|
|
|
- if (likely(!(ioflags & IO_INVIS))) {
|
|
|
|
|
|
+ /*
|
|
|
|
+ * We're not supposed to change timestamps in readonly-mounted
|
|
|
|
+ * filesystems. Throw it away if anyone asks us.
|
|
|
|
+ */
|
|
|
|
+ if (likely(!(ioflags & IO_INVIS) &&
|
|
|
|
+ !mnt_want_write(file->f_path.mnt))) {
|
|
file_update_time(file);
|
|
file_update_time(file);
|
|
xfs_ichgtime_fast(xip, inode,
|
|
xfs_ichgtime_fast(xip, inode,
|
|
XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
|
|
XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG);
|
|
|
|
+ mnt_drop_write(file->f_path.mnt);
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|