diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-29 17:42:25 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-29 17:42:25 -0400 |
commit | 9f321603724be7386ea39ea41fd885954db60a4a (patch) | |
tree | efd64c26c2fb2698ecd95c2f10dc1016b45ba4a4 /fs/ceph/addr.c | |
parent | 9d54e2c0b0a03b0f05fc4f988323c858ec9d7740 (diff) | |
parent | 82593f87b6c1922a8f8317bb165c6c7794fa4639 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client: (28 commits)
ceph: update discussion list address in MAINTAINERS
ceph: some documentations fixes
ceph: fix use after free on mds __unregister_request
ceph: avoid loaded term 'OSD' in documention
ceph: fix possible double-free of mds request reference
ceph: fix session check on mds reply
ceph: handle kmalloc() failure
ceph: propagate mds session allocation failures to caller
ceph: make write_begin wait propagate ERESTARTSYS
ceph: fix snap rebuild condition
ceph: avoid reopening osd connections when address hasn't changed
ceph: rename r_sent_stamp r_stamp
ceph: fix connection fault con_work reentrancy problem
ceph: prevent dup stale messages to console for restarting mds
ceph: fix pg pool decoding from incremental osdmap update
ceph: fix mds sync() race with completing requests
ceph: only release unused caps with mds requests
ceph: clean up handle_cap_grant, handle_caps wrt session mutex
ceph: fix session locking in handle_caps, ceph_check_caps
ceph: drop unnecessary WARN_ON in caps migration
...
Diffstat (limited to 'fs/ceph/addr.c')
-rw-r--r-- | fs/ceph/addr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index 23bb0ceabe31..ce8ef6107727 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c | |||
@@ -919,6 +919,10 @@ static int context_is_writeable_or_written(struct inode *inode, | |||
919 | /* | 919 | /* |
920 | * We are only allowed to write into/dirty the page if the page is | 920 | * We are only allowed to write into/dirty the page if the page is |
921 | * clean, or already dirty within the same snap context. | 921 | * clean, or already dirty within the same snap context. |
922 | * | ||
923 | * called with page locked. | ||
924 | * return success with page locked, | ||
925 | * or any failure (incl -EAGAIN) with page unlocked. | ||
922 | */ | 926 | */ |
923 | static int ceph_update_writeable_page(struct file *file, | 927 | static int ceph_update_writeable_page(struct file *file, |
924 | loff_t pos, unsigned len, | 928 | loff_t pos, unsigned len, |
@@ -961,9 +965,11 @@ retry_locked: | |||
961 | snapc = ceph_get_snap_context((void *)page->private); | 965 | snapc = ceph_get_snap_context((void *)page->private); |
962 | unlock_page(page); | 966 | unlock_page(page); |
963 | ceph_queue_writeback(inode); | 967 | ceph_queue_writeback(inode); |
964 | wait_event_interruptible(ci->i_cap_wq, | 968 | r = wait_event_interruptible(ci->i_cap_wq, |
965 | context_is_writeable_or_written(inode, snapc)); | 969 | context_is_writeable_or_written(inode, snapc)); |
966 | ceph_put_snap_context(snapc); | 970 | ceph_put_snap_context(snapc); |
971 | if (r == -ERESTARTSYS) | ||
972 | return r; | ||
967 | return -EAGAIN; | 973 | return -EAGAIN; |
968 | } | 974 | } |
969 | 975 | ||
@@ -1035,7 +1041,7 @@ static int ceph_write_begin(struct file *file, struct address_space *mapping, | |||
1035 | int r; | 1041 | int r; |
1036 | 1042 | ||
1037 | do { | 1043 | do { |
1038 | /* get a page*/ | 1044 | /* get a page */ |
1039 | page = grab_cache_page_write_begin(mapping, index, 0); | 1045 | page = grab_cache_page_write_begin(mapping, index, 0); |
1040 | if (!page) | 1046 | if (!page) |
1041 | return -ENOMEM; | 1047 | return -ENOMEM; |