[PATCH] e2fsprogs: e4defrag must open the file to be defragged in read/write mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Akira Fujita merged a patch into 2.6.33 that adds a requirement that a file
being defragged must be opened with read and write access, so e2fsprogs needs
to satisfy that.

Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx>
--- a/misc/e4defrag.c
+++ b/misc/e4defrag.c
@@ -1605,7 +1605,7 @@ static int file_defrag(const char *file, const struct stat64 *buf,
 		return 0;
 	}
 
-	fd = open64(file, O_RDONLY);
+	fd = open64(file, O_RDWR);
 	if (fd < 0) {
 		if (mode_flag & DETAIL) {
 			PRINT_FILE_NAME(file);
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux