Signed-off-by: Jan Kara <jack@suse.cz>
---
- fs/ocfs2/alloc.c | 18 ++++++-
- fs/ocfs2/aops.c | 16 +++++-
- fs/ocfs2/dir.c | 24 ++++++++-
- fs/ocfs2/file.c | 70 ++++++++++++++++++++++--
- fs/ocfs2/inode.c | 10 +++-
- fs/ocfs2/journal.h | 99 ++++++++++++++++++++++++----------
- fs/ocfs2/namei.c | 151 +++++++++++++++++++++++++++++++++++----------------
- 7 files changed, 296 insertions(+), 92 deletions(-)
+ fs/ocfs2/alloc.c | 20 +++++++++-
+ fs/ocfs2/aops.c | 16 ++++++--
+ fs/ocfs2/dir.c | 24 +++++++++++-
+ fs/ocfs2/file.c | 68 +++++++++++++++++++++++++++++++++---
+ fs/ocfs2/inode.c | 10 ++++-
+ fs/ocfs2/journal.h | 99 ++++++++++++++++++++++++++++++++++++-----------------
+ fs/ocfs2/namei.c | 44 +++++++++++++++++++++--
+ fs/ocfs2/xattr.c | 12 +++---
+ 8 files changed, 239 insertions(+), 54 deletions(-)
-Index: linux-2.6.27-ocfs2/fs/ocfs2/alloc.c
-===================================================================
---- linux-2.6.27-ocfs2.orig/fs/ocfs2/alloc.c
-+++ linux-2.6.27-ocfs2/fs/ocfs2/alloc.c
+--- a/fs/ocfs2/alloc.c
++++ b/fs/ocfs2/alloc.c
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/highmem.h>
ocfs2_commit_trans(osb, handle);
out_unlock:
-Index: linux-2.6.27-ocfs2/fs/ocfs2/aops.c
-===================================================================
---- linux-2.6.27-ocfs2.orig/fs/ocfs2/aops.c
-+++ linux-2.6.27-ocfs2/fs/ocfs2/aops.c
+--- a/fs/ocfs2/aops.c
++++ b/fs/ocfs2/aops.c
@@ -27,6 +27,7 @@
#include <linux/swap.h>
#include <linux/pipe_fs_i.h>
#define MLOG_MASK_PREFIX ML_FILE_IO
#include <cluster/masklog.h>
-@@ -1750,6 +1751,11 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1780,6 +1781,11 @@ int ocfs2_write_begin_nolock(struct addr
wc->w_handle = handle;
/*
* We don't want this to fail in ocfs2_write_end(), so do it
* here.
-@@ -1758,7 +1764,7 @@ int ocfs2_write_begin_nolock(struct addr
+@@ -1788,7 +1794,7 @@ int ocfs2_write_begin_nolock(struct addr
OCFS2_JOURNAL_ACCESS_WRITE);
if (ret) {
mlog_errno(ret);
}
/*
-@@ -1771,14 +1777,14 @@ int ocfs2_write_begin_nolock(struct addr
- mmap_page);
+@@ -1800,14 +1806,14 @@ int ocfs2_write_begin_nolock(struct addr
+ cluster_of_pages, mmap_page);
if (ret) {
mlog_errno(ret);
- goto out_commit;
}
if (data_ac)
-@@ -1790,6 +1796,10 @@ success:
+@@ -1819,6 +1825,10 @@ success:
*pagep = wc->w_target_page;
*fsdata = wc;
return 0;
out_commit:
ocfs2_commit_trans(osb, handle);
-Index: linux-2.6.27-ocfs2/fs/ocfs2/dir.c
-===================================================================
---- linux-2.6.27-ocfs2.orig/fs/ocfs2/dir.c
-+++ linux-2.6.27-ocfs2/fs/ocfs2/dir.c
+--- a/fs/ocfs2/dir.c
++++ b/fs/ocfs2/dir.c
@@ -40,6 +40,7 @@
#include <linux/types.h>
#include <linux/slab.h>
if (extend) {
u32 offset = OCFS2_I(dir)->ip_clusters;
-+ if (vfs_dq_alloc_space_nodirty(dir,
-+ ocfs2_clusters_to_bytes(sb, 1))) {
-+ status = -EDQUOT;
-+ goto bail;
-+ }
-+ did_quota = 1;
++ if (vfs_dq_alloc_space_nodirty(dir,
++ ocfs2_clusters_to_bytes(sb, 1))) {
++ status = -EDQUOT;
++ goto bail;
++ }
++ did_quota = 1;
+
status = ocfs2_add_inode_data(OCFS2_SB(sb), dir, &offset,
1, 0, parent_fe_bh, handle,
mlog_exit(status);
return status;
}
-Index: linux-2.6.27-ocfs2/fs/ocfs2/file.c
-===================================================================
---- linux-2.6.27-ocfs2.orig/fs/ocfs2/file.c
-+++ linux-2.6.27-ocfs2/fs/ocfs2/file.c
+--- a/fs/ocfs2/file.c
++++ b/fs/ocfs2/file.c
@@ -35,6 +35,7 @@
#include <linux/mount.h>
#include <linux/writeback.h>
ocfs2_inode_unlock(inode, 1);
bail_unlock_rw:
if (size_change)
-Index: linux-2.6.27-ocfs2/fs/ocfs2/inode.c
-===================================================================
---- linux-2.6.27-ocfs2.orig/fs/ocfs2/inode.c
-+++ linux-2.6.27-ocfs2/fs/ocfs2/inode.c
+--- a/fs/ocfs2/inode.c
++++ b/fs/ocfs2/inode.c
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/highmem.h>
mlog(0, "Skipping delete of bad inode\n");
goto bail;
}
-Index: linux-2.6.27-ocfs2/fs/ocfs2/journal.h
-===================================================================
---- linux-2.6.27-ocfs2.orig/fs/ocfs2/journal.h
-+++ linux-2.6.27-ocfs2/fs/ocfs2/journal.h
+--- a/fs/ocfs2/journal.h
++++ b/fs/ocfs2/journal.h
@@ -293,6 +293,37 @@ int ocfs2_journal_dirty
/* extended attribute block update */
#define OCFS2_XATTR_BLOCK_UPDATE_CREDITS 1
return credits;
}
-Index: linux-2.6.27-ocfs2/fs/ocfs2/namei.c
-===================================================================
---- linux-2.6.27-ocfs2.orig/fs/ocfs2/namei.c
-+++ linux-2.6.27-ocfs2/fs/ocfs2/namei.c
+--- a/fs/ocfs2/namei.c
++++ b/fs/ocfs2/namei.c
@@ -40,6 +40,7 @@
#include <linux/types.h>
#include <linux/slab.h>
if (handle)
ocfs2_commit_trans(osb, handle);
-Index: linux-2.6.27-ocfs2/fs/ocfs2/xattr.c
-===================================================================
---- linux-2.6.27-ocfs2.orig/fs/ocfs2/xattr.c
-+++ linux-2.6.27-ocfs2/fs/ocfs2/xattr.c
+--- a/fs/ocfs2/xattr.c
++++ b/fs/ocfs2/xattr.c
@@ -1613,7 +1613,7 @@ static int ocfs2_remove_value_outside(st
ocfs2_init_dealloc_ctxt(&ctxt.dealloc);